WebSky-CITA / XGPaint.jl

fast forward simulations of extragalactic foregrounds
https://websky-cita.github.io/XGPaint.jl/dev/
MIT License
4 stars 3 forks source link

separate interpolator generation for model from source generation #23

Open dongwooc opened 1 year ago

dongwooc commented 1 year ago

at the moment get_interpolators runs every time generate_sources happens. this results in an inefficiency that is admittedly very minor, but if interpolator generation becomes expensive for whatever reason at some future point, for chunked runs it is likely more performant to generate interpolators once for the whole halo catalogue and then pass that to the per-chunk function each time.

xzackli commented 1 year ago

Yes, @dongwooc I'd propose to make the interfaces across all models similar to the tsz model

  1. Configuration type contains model input parameters
  2. Create a source workspace type based on model (contains interpolators but also source information, has empty! implemented to reset source realization
  3. Create workspace type for maps, different for each pixelization
  4. Call paint! on map, passing the two workspaces