Skip to content

Commit b2a5655

Browse files
committed
Final working version of SDSS mockup
1 parent ca618dc commit b2a5655

File tree

9 files changed

+695
-52
lines changed

9 files changed

+695
-52
lines changed

Manifest.toml

Lines changed: 77 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
julia_version = "1.12.4"
44
manifest_format = "2.0"
5-
project_hash = "202ccab0baded9db29714373162e784d21a62543"
5+
project_hash = "1560840b2eb579fcf2e15ac9956ef29a6618bfd4"
66

77
[[deps.AbstractFFTs]]
88
deps = ["LinearAlgebra"]
@@ -99,6 +99,17 @@ version = "7.22.0"
9999
uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
100100
version = "1.11.0"
101101

102+
[[deps.AstroAngles]]
103+
git-tree-sha1 = "bc188d9a6507511e7360444d54ed57d0a9d6cf91"
104+
uuid = "5c4adb95-c1fc-4c53-b4ea-2a94080c53d2"
105+
version = "0.2.0"
106+
107+
[[deps.AstroImages]]
108+
deps = ["AbstractFFTs", "AstroAngles", "ColorSchemes", "DimensionalData", "FITSIO", "FileIO", "ImageAxes", "ImageBase", "ImageIO", "ImageShow", "MappedArrays", "PlotUtils", "PrecompileTools", "Printf", "RecipesBase", "Statistics", "Tables", "UUIDs", "WCS"]
109+
git-tree-sha1 = "b036ab0541311fee6f278e1469b7839cc3af8f19"
110+
uuid = "fe3fc30c-9b16-11e9-1c73-17dabf39f4ad"
111+
version = "0.5.1"
112+
102113
[[deps.Automa]]
103114
deps = ["PrecompileTools", "SIMD", "TranscodingStreams"]
104115
git-tree-sha1 = "a8f503e8e1a5f583fbef15a8440c8c7e32185df2"
@@ -143,6 +154,18 @@ git-tree-sha1 = "389ad5c84de1ae7cf0e28e381131c98ea87d54fc"
143154
uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82"
144155
version = "0.5.0"
145156

157+
[[deps.CFITSIO]]
158+
deps = ["CFITSIO_jll"]
159+
git-tree-sha1 = "8c6b984c3928736d455eb53a6adf881457825269"
160+
uuid = "3b1b4be9-1499-4b22-8d78-7db3344d1961"
161+
version = "1.7.2"
162+
163+
[[deps.CFITSIO_jll]]
164+
deps = ["Artifacts", "Bzip2_jll", "JLLWrappers", "LibCURL_jll", "Libdl", "Zlib_jll"]
165+
git-tree-sha1 = "15e80be798d7711411f4ac4273144cdb2a89eb2f"
166+
uuid = "b3e40c51-02ae-5482-8a39-3ace5868dcf4"
167+
version = "4.6.2+0"
168+
146169
[[deps.CPUSummary]]
147170
deps = ["CpuId", "IfElse", "PrecompileTools", "Preferences", "Static"]
148171
git-tree-sha1 = "f3a21d7fc84ba618a779d1ed2fcca2e682865bab"
@@ -386,6 +409,36 @@ git-tree-sha1 = "c55f5a9fd67bdbc8e089b5a3111fe4292986a8e8"
386409
uuid = "927a84f5-c5f4-47a5-9785-b46e178433df"
387410
version = "1.6.6"
388411

412+
[[deps.DimensionalData]]
413+
deps = ["Adapt", "ArrayInterface", "ConstructionBase", "DataAPI", "Dates", "Extents", "Interfaces", "IntervalSets", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "OrderedCollections", "PrecompileTools", "Random", "RecipesBase", "Statistics", "TableTraits", "Tables"]
414+
git-tree-sha1 = "147961441e5cb35da0af404aa4684d2e74ec68eb"
415+
uuid = "0703355e-b756-11e9-17c0-8b28908087d0"
416+
version = "0.29.25"
417+
418+
[deps.DimensionalData.extensions]
419+
DimensionalDataAbstractFFTsExt = "AbstractFFTs"
420+
DimensionalDataAlgebraOfGraphicsExt = "AlgebraOfGraphics"
421+
DimensionalDataCategoricalArraysExt = "CategoricalArrays"
422+
DimensionalDataChainRulesCoreExt = "ChainRulesCore"
423+
DimensionalDataDiskArraysExt = "DiskArrays"
424+
DimensionalDataMakieExt = "Makie"
425+
DimensionalDataNearestNeighborsExt = "NearestNeighbors"
426+
DimensionalDataPythonCallExt = "PythonCall"
427+
DimensionalDataSparseArraysExt = "SparseArrays"
428+
DimensionalDataStatsBaseExt = "StatsBase"
429+
430+
[deps.DimensionalData.weakdeps]
431+
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"
432+
AlgebraOfGraphics = "cbdf2221-f076-402e-a563-3d30da359d67"
433+
CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597"
434+
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
435+
DiskArrays = "3c3547ce-8d99-4f5e-a174-61eb10b00ae3"
436+
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
437+
NearestNeighbors = "b8a86587-4115-5ab1-83bc-aa920d37bbce"
438+
PythonCall = "6099a3de-0909-46bc-b1f4-468b9a2dfc0d"
439+
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
440+
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
441+
389442
[[deps.Distances]]
390443
deps = ["LinearAlgebra", "Statistics", "StatsAPI"]
391444
git-tree-sha1 = "c7e3a542b999843086e2f29dac96a618c105be1d"
@@ -480,6 +533,12 @@ git-tree-sha1 = "6d6219a004b8cf1e0b4dbe27a2860b8e04eba0be"
480533
uuid = "f5851436-0d7a-5f13-b9de-f02708fd171a"
481534
version = "3.3.11+0"
482535

536+
[[deps.FITSIO]]
537+
deps = ["CFITSIO", "Printf", "Reexport", "Tables"]
538+
git-tree-sha1 = "f57de3f533590c785210893030736dc11c4a4afb"
539+
uuid = "525bcba6-941b-5504-bd06-fd0dc1a4d2eb"
540+
version = "0.17.5"
541+
483542
[[deps.FileIO]]
484543
deps = ["Pkg", "Requires", "UUIDs"]
485544
git-tree-sha1 = "d60eb76f37d7e5a40cc2e7c36974d864b82dc802"
@@ -882,6 +941,11 @@ deps = ["Markdown"]
882941
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
883942
version = "1.11.0"
884943

944+
[[deps.Interfaces]]
945+
git-tree-sha1 = "331ff37738aea1a3cf841ddf085442f31b84324f"
946+
uuid = "85a1e053-f937-4924-92a5-1367d23b7b87"
947+
version = "0.3.2"
948+
885949
[[deps.Interpolations]]
886950
deps = ["Adapt", "AxisAlgorithms", "ChainRulesCore", "LinearAlgebra", "OffsetArrays", "Random", "Ratios", "SharedArrays", "SparseArrays", "StaticArrays", "WoodburyMatrices"]
887951
git-tree-sha1 = "65d505fa4c0d7072990d659ef3fc086eb6da8208"
@@ -2045,6 +2109,18 @@ git-tree-sha1 = "d1d9a935a26c475ebffd54e9c7ad11627c43ea85"
20452109
uuid = "3d5dd08c-fd9d-11e8-17fa-ed2836048c2f"
20462110
version = "0.21.72"
20472111

2112+
[[deps.WCS]]
2113+
deps = ["ConstructionBase", "WCS_jll"]
2114+
git-tree-sha1 = "c12065744b66adfed32d24c2a13a3053cc235ea7"
2115+
uuid = "15f3aee2-9e10-537f-b834-a6fb8bdb944d"
2116+
version = "0.6.3"
2117+
2118+
[[deps.WCS_jll]]
2119+
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
2120+
git-tree-sha1 = "947bfa11fcd65dac9e9b2e963504fba6b4971d31"
2121+
uuid = "550c8279-ae0e-5d1b-948f-937f2608a23e"
2122+
version = "7.7.0+0"
2123+
20482124
[[deps.WeakRefStrings]]
20492125
deps = ["DataAPI", "InlineStrings", "Parsers"]
20502126
git-tree-sha1 = "b1be2855ed9ed8eac54e5caff2afcdb442d52c23"

Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ uuid = "990b1489-e520-4e93-b9dc-df8612ec7e1d"
33
authors = ["Ezequiel Lozano <elozano@df.uba.ar>"]
44

55
[deps]
6+
AstroImages = "fe3fc30c-9b16-11e9-1c73-17dabf39f4ad"
67
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
78
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
89
ColorSchemes = "35d6a980-a343-548e-a6ea-1d62b119f2f4"
@@ -33,6 +34,7 @@ UnitfulAstro = "6112ee07-acf9-5e0f-b108-d242c714bf9f"
3334
WriteVTK = "64499a7a-5c06-52f2-abe2-ccb03c286192"
3435

3536
[compat]
37+
AstroImages = "0.5.1"
3638
Distances = "0.10.12"
3739
Interpolations = "0.16.2"
3840
StaticArrays = "1.9.15"

src/GalaxyInspector.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414

1515
module GalaxyInspector
1616

17-
using CSV,
17+
using AstroImages,
18+
CSV,
1819
CairoMakie,
1920
ColorSchemes,
2021
Colors,
@@ -131,6 +132,7 @@ export stellarDensityMaps
131132
export gasDensityMaps
132133
export gasFractionsEvolution
133134
export evolutionVideo
135+
export SDSSMockup
134136
export snapshotReport
135137
export simulationReport
136138
export quantityReport

src/analysis/compute_quantities/masses.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1375,7 +1375,7 @@ function computeNumberDensity(data_dict::Dict, component::Symbol)::Vector{<:Numb
13751375
end
13761376

13771377
"""
1378-
computeNumber(data_dict::Dict, component::Symbol)::Vector{Int64}
1378+
computeNumber(data_dict::Dict, component::Symbol)::Vector{Float64}
13791379
13801380
Compute the number of a given `component`.
13811381
@@ -1414,14 +1414,14 @@ Compute the number of a given `component`.
14141414
14151415
L. Blitz et al. (2006). *The Role of Pressure in GMC Formation II: The H2-Pressure Relation*. The Astrophysical Journal, **650(2)**, 933. [doi:10.1086/505417](https://doi.org/10.1086/505417)
14161416
"""
1417-
function computeNumber(data_dict::Dict, component::Symbol)::Vector{Int64}
1417+
function computeNumber(data_dict::Dict, component::Symbol)::Vector{Float64}
14181418

14191419
if component COMPONENTS
14201420
throw(ArgumentError("computeNumber: `component` can only be one of the elements of \
14211421
`COMPONENTS` (see `./src/constants/globals.jl`), but I got :$(component)"))
14221422
end
14231423

1424-
if component [:stellar, :dark_matter, :black_hole. :gas]
1424+
if component [:stellar, :dark_matter, :black_hole, :gas]
14251425

14261426
############################################################################################
14271427
# Number as the amount of particles
@@ -1445,7 +1445,7 @@ function computeNumber(data_dict::Dict, component::Symbol)::Vector{Int64}
14451445

14461446
M = computeMass(data_dict, component)
14471447

1448-
N = M / (2.0 * Unitful.mp)
1448+
N = ustrip.(Unitful.NoUnits, M / (2.0 * Unitful.mp))
14491449

14501450
else
14511451

@@ -1455,7 +1455,7 @@ function computeNumber(data_dict::Dict, component::Symbol)::Vector{Int64}
14551455

14561456
M = computeMass(data_dict, component)
14571457

1458-
N = M / Unitful.mp
1458+
N = ustrip.(Unitful.NoUnits, M / Unitful.mp)
14591459

14601460
end
14611461

@@ -1467,7 +1467,7 @@ function computeNumber(data_dict::Dict, component::Symbol)::Vector{Int64}
14671467

14681468
end
14691469

1470-
return ustrip.(Unitful.NoUnits, N)
1470+
return N
14711471

14721472
end
14731473

@@ -2086,7 +2086,7 @@ function quantity3DProjection(
20862086

20872087
end
20882088

2089-
voxel_values = histogram3D(positions, qty_values, grid; empty_nan, tall=true)
2089+
voxel_values = histogram3D(positions, qty_values, grid; empty_nan)
20902090

20912091
end
20922092

0 commit comments

Comments
 (0)