imcgreer / simqso

Module for generating simulated quasar spectra
BSD 3-Clause "New" or "Revised" License
12 stars 11 forks source link

cleanup handling of forest sightlines #21

Open imcgreer opened 6 years ago

imcgreer commented 6 years ago

There are two cases for generating sightlines: 1) [the default] create a subsample of forest sightlines and randomly assign them to quasars, e.g., 10 sightlines for 50 quasars means each sightline is used by an average of 5 quasars. This mode is implemented by grouping the quasars by sightline, sorting by redshift, and then generating the spectra in order so that the absorbers get added in increasing redshift. 2) each quasar has its own sightline, in which case this grouping/sorting isn't necessary.

Implementing both of these modes in IGMTransmissionGrid is messy. The second mode could be implemented by using all_spec() from that class, and then passing the resulting Table to CachedIGMTransmissionGrid. But that's kind of messy too.