@@ -65,17 +65,35 @@ the gravitational potential. The files correspond to integrated weak
6565lensing convergence maps (:math: `\kappa `) that assume an
6666non-tomographic Euclid-like source redshift distribution and are saved
6767as ring-ordered Healpix maps at :math: `N_\mathrm {side} = 8192 `. No
68- smoothing or noise has been applied to these files. The files can be
69- read as
68+ smoothing or noise has been applied to these files.
7069
70+ Each simulation has a subdirectory ``value_add/broxterman24 `` which
71+ contains the convergence maps. For example, the maps for ``L1_m9 `` are
72+ in `this directory
73+ </flamingo/viewer.html?path=FLAMINGO/L1_m9/L1_m9/value_add/broxterman24> `__. The
74+ files can be accessed using the :doc: `hdfstream
75+ </service_docs/python_module>` module or downloaded and read directly,
76+ as shown below.
7177
72- .. code-block :: python
78+ .. tab-set ::
7379
74- import h5py
75- file_path = ' /cosma8/data/dp004/dc-brox1/FLAMINGO_datarelease/WL_convergence_Euclid_like_nz_Broxterman24_L1_m9_lc0.hdf5'
76- data_file = h5py.File(f " / { file_path} " ,' r' )
77- kappa_map = data_file[" Convergence" ][:]
78- data_file.close()
80+ .. tab-item :: Remote access
81+
82+ .. code-block :: python
83+
84+ import hdfstream
85+ file_path = ' FLAMINGO/L1_m9/L1_m9/value_add/broxterman24/WL_convergence_Euclid_like_nz_Broxterman24_L1_m9_lc0.hdf5'
86+ with hdfstream.open(" cosma" , file_path) as data_file:
87+ kappa_map = data_file[" Convergence" ][:]
88+
89+ .. tab-item :: Reading downloaded files
90+
91+ .. code-block :: python
92+
93+ import h5py
94+ file_path = ' ./FLAMINGO/L1_m9/L1_m9/value_add/broxterman24/WL_convergence_Euclid_like_nz_Broxterman24_L1_m9_lc0.hdf5'
95+ with h5py.File(f " / { file_path} " ,' r' ) as data_file:
96+ kappa_map = data_file[" Convergence" ][:]
7997
8098 where the part ``L1_m9_lc0 `` changes between the variations and lightcones (lc), for example,
8199``L2p8_m9_DMO_lc4 `` for observer four in the 2800 cGpc dark-matter-only box.
@@ -98,30 +116,63 @@ lightcone (of the 0th observer of each ``L1_m9`` simulation
98116given). When integrating along the line of sight the on-sky
99117coordinates of the gas particles in each shell are rotated as
100118described in `Broxterman et al (2024)
101- <https://ui.adsabs.harvard.edu/abs/2024MNRAS.529.2309B%2F/abstract> `__. The
102- maps containing the X-ray emission from hot gas can be read as
119+ <https://ui.adsabs.harvard.edu/abs/2024MNRAS.529.2309B%2F/abstract> `__.
103120
104- .. code-block :: python
121+ Each simulation has a subdirectory ``value_add/mcdonald26 `` which
122+ contains the convergence maps. For example, the maps for ``L1_m9 `` are
123+ in `this directory
124+ </flamingo/viewer.html?path=FLAMINGO/L1_m9/L1_m9/value_add/mcdonald26> `__. The
125+ files can be accessed using the :doc: `hdfstream
126+ </service_docs/python_module>` module or downloaded and read
127+ directly. Below, we show how to read the maps:
105128
106- import h5py
107- filename= " /cosma8/data/dp004/dc-mcdo1/DataRelease/ROSAT_Xray_Maps/Gas_Convolved/{BoxsizeResolution} /{SimulationName} .h5"
108- xray_source= " Gas"
109- map_name= " XrayROSATIntrinsicPhotonsConvolved"
129+ .. tab-set ::
130+
131+ .. tab-item :: Remote access
132+
133+ .. code-block :: python
110134
111- with h5py.File(filename.format( BoxsizeResolution = " L1000N1800 " , SimulationName = " HYDRO_FIDUCIAL " ), " r " ) as integrated_map:
135+ import hdfstream
112136
113- # read ROSAT convolved photon flux X-ray map
114- ROSAT_Xray_map = integrated_map[xray_source+ ' /' + map_name][:]
137+ xray_source= " Gas"
138+ map_name= " XrayROSATIntrinsicPhotonsConvolved"
139+ with hdfstream.open(" cosma" , " ./FLAMINGO/L1_m9/L1_m9/value_add/mcdonald26/ROSAT_convolved_Xray_AllSky_L1_m9.hdf5" , " r" ) as integrated_map:
115140
116- # print simulations identifier (name) in FLAMINGO papers:
117- print ( " \t FLAMINGO identifier: {label} " .format( label = integrated_map[xray_source].attrs[ ' paper_name ' ][:]))
141+ # read ROSAT convolved photon flux X-ray map
142+ ROSAT_Xray_map = integrated_map[xray_source+ ' / ' + map_name ][:]
118143
119- # print integrated redshift range:
120- lc_zmin= integrated_map[xray_source].attrs[' redshift_min' ] lc_zmax= integrated_map[xray_source].attrs[' redshift_max' ]
121- print (" \t redshift range: {zmin:.3f } , {zmax:.3f } " .format(zmin = lc_zmin, zmax = lc_zmax))
144+ # print simulations identifier (name) in FLAMINGO papers:
145+ print (" \t FLAMINGO identifier: {label} " .format(label = integrated_map[xray_source].attrs[' paper_name' ][:]))
122146
123- # print expression for map units:
124- print (" \t unit expression: {map_units} " .format(map_units = integrated_map[xray_source].attrs[' unit_expression' ]))
147+ # print integrated redshift range:
148+ lc_zmin= integrated_map[xray_source].attrs[' redshift_min' ] lc_zmax= integrated_map[xray_source].attrs[' redshift_max' ]
149+ print (" \t redshift range: {zmin:.3f } , {zmax:.3f } " .format(zmin = lc_zmin, zmax = lc_zmax))
150+
151+ # print expression for map units:
152+ print (" \t unit expression: {map_units} " .format(map_units = integrated_map[xray_source].attrs[' unit_expression' ]))
153+
154+ .. tab-item :: Reading local files
155+
156+ .. code-block :: python
157+
158+ import h5py
159+
160+ xray_source= " Gas"
161+ map_name= " XrayROSATIntrinsicPhotonsConvolved"
162+ with h5py.File(" ./FLAMINGO/L1_m9/L1_m9/value_add/mcdonald26/ROSAT_convolved_Xray_AllSky_L1_m9.hdf5" , " r" ) as integrated_map:
163+
164+ # read ROSAT convolved photon flux X-ray map
165+ ROSAT_Xray_map = integrated_map[xray_source+ ' /' + map_name][:]
166+
167+ # print simulations identifier (name) in FLAMINGO papers:
168+ print (" \t FLAMINGO identifier: {label} " .format(label = integrated_map[xray_source].attrs[' paper_name' ][:]))
169+
170+ # print integrated redshift range:
171+ lc_zmin= integrated_map[xray_source].attrs[' redshift_min' ] lc_zmax= integrated_map[xray_source].attrs[' redshift_max' ]
172+ print (" \t redshift range: {zmin:.3f } , {zmax:.3f } " .format(zmin = lc_zmin, zmax = lc_zmax))
173+
174+ # print expression for map units:
175+ print (" \t unit expression: {map_units} " .format(map_units = integrated_map[xray_source].attrs[' unit_expression' ]))
125176
126177
127178
@@ -136,15 +187,13 @@ to per steradian (or square degree.)
136187 import h5py
137188 import healpy as hp
138189 import unyt
139- filename= " /cosma8/data/dp004/dc-mcdo1/DataRelease/ROSAT_Xray_Maps/Gas_Convolved/{BoxsizeResolution} /{simulation} .h5"
140190 xray_source= " Gas"
141191 map_name= " XrayROSATIntrinsicPhotonsConvolved"
142- with h5py.File(filename.format(BoxsizeResolution = " L1000N1800" , simulation = " HYDRO_FIDUCIAL" ), " r" ) as integrated_map:
192+
193+ with h5py.File(" ./FLAMINGO/L1_m9/L1_m9/value_add/mcdonald26/ROSAT_convolved_Xray_AllSky_L1_m9.hdf5" , " r" ) as integrated_map:
143194 # read map
144195 ROSAT_Xray_map_per_sr = integrated_map[xray_source+ ' /' + map_name][:]
145-
146196 nside = integrated_map[xray_source].attrs[' shell_nside' ] # can take nside from map attributes, otherwise confirm from the number of pixels in the map
147197 # apply unit transformation and define map units
148198 ROSAT_Xray_map_per_sr /= hp.nside2pixarea(nside, degrees = False ) * unyt.photon / unyt.s / unyt.radian** 2
149199
150-
0 commit comments