Skip to content

Xray functions and examples for particle lightcones#23

Open
Will-McD wants to merge 51 commits intojchelly:masterfrom
Will-McD:lc_xrays
Open

Xray functions and examples for particle lightcones#23
Will-McD wants to merge 51 commits intojchelly:masterfrom
Will-McD:lc_xrays

Conversation

@Will-McD
Copy link

Added functions to compute X-ray luminosity and flux values for particles in the lightcones.

For an example on how to compute X-ray values for a selection of gas particles see ./examples/xray_emission_in_a_pencil_beam.py

Will-McD added 19 commits March 12, 2026 11:52
Included rotation functions for smoothed map making. Now can input angles (theta, phi) to rotate particle coordinates on the sky before placing them into the map. 
Rotating the particles' coordinates prior to placing them in the map resolves some of the problems that can be introduced by rotating the smoothed maps themselves when neighbouring pixels have a high variance.
X-ray interpolation and computation functions for the particle lightcone. 

This differs from the Snapshot version by allowing a multiple redshifts at once
xray_calculator included
Added comsology object and xray particle filters
Added functions to compute X-ray luminosities and flux for the particle lightcone
Example of computing X-ray values for the particle lightcone
Included plots showing the distribution for photons and energies outputs
included new Xray functions and classes.
as the title says
- Now passes snapshot directory instead of snapshot .h5 file path 

- Extra functions to compute radius from redshifts
Now includes an example plot.
follows updates to cosmology functions
removed unneeded comments and print messages
Will-McD added 10 commits March 16, 2026 09:51
small doc string clean up
made exceptions more specific and robust
fixed missing z_at_value function, 
from astropy.cosmology import z_at_value
fixed problem with not giving correct output names to X-ray luminosity values when only one observation band is given.
included convolved X-ray units into the missing units dictionary
now includes X-ray requirements
Now includes X-ray computation requirements
Will-McD added 22 commits March 18, 2026 14:35
Was removing the actual particle data values earlier than necessary, instead of only removing the .ndarray_view()  version to minimise overhead
Using the particle lightcones write a set of X-ray all-sky maps, one map per observation band, for a given X-ray observation type.
example script to make an all-sky map of X-ray emission of a given type in all three FLAMINGO energy bands
bash script for x-ray map example
edits to the code comments and removed lines that are not necessary.
added comments to point user towards where to build needed virtual environment.
Small changes to make cleaner example code. 
Moved excess functions to xray_map_all_bands.py to simplify this example.
Can now read a dictionary input for the emissivity table or a string with the path to the table itself.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant