Skip to content

Commit

Permalink
Rewrote IGM transmission:
Browse files Browse the repository at this point in the history
	- Restored original transmission_Lyman
	- Moved the new calculations to transmission_IGM_old
	- Created new transmission_IGM that has vectorized and GPU-ized
	  operations that match output of transmission_IGM_old

For now I simply have the existing transmission_Lyman return either
transmission_IGM or transmission_IGM_old, but eventually we will want to
change the code to change calls to transmission_Lyman to
transmission_IGM assuming this function will supplant the old one (or we
can just rename it but I wanted to keep them distinct for now so as to
not mess with other branches).  Also eventually we may have logic where
a grid is calculated once and then used to interpolate values instead of
repeating the calculations every time.

Note that transmission_IGM_old calls IGM.full_IGM_old - I have kept the
functions that calls included for now for easy comparison with similar
_old appended to them.  These versions will go away as the vectorized
version will work with 1 or N redshifts.

Also note I added copy_data_to_gpu method which caches and resizes
various data arrays read from disk.

Finally note on lines 743-747 - I believe what we want to pass to
full_IGM is lObs and not lRF because lRF already is divided by (1+z) -
and this would not make sense when for instance doing comparisons like
`x0 = lobs < lamL*(1.+zS)[:,None]`
- I think the comparison should be between lObs and lamL*(1+zS) OR
  between lRF and lamL. We might want to eventually change the code to do the
latter so that we get rid of the extra multiplication or even pass both
lRF and lObs such that we don't have to do any extra multiplication or
division.

Also I believe that
`    i = min_wave < 1215.`
will give us the correct behavior we want instead of the hack of just
looking at z < 2.
  • Loading branch information
craigwarner-ufastro committed Sep 25, 2023
1 parent 8d8ebc5 commit f939243
Showing 1 changed file with 338 additions and 30 deletions.
Loading

0 comments on commit f939243

Please sign in to comment.