planck-npipe / toast-npipe

TOAST Planck extension used in NPIPE processing
BSD 2-Clause "Simplified" License
1 stars 0 forks source link

Modify reduce pipeline to simulate noise and foregrounds without CMB #4

Closed keskitalo closed 8 months ago

keskitalo commented 9 months ago

To replace the signal with a simulation, add these command line options:

    --skymodel_sim skymodel_cache/sky_model_857GHz_nside2048_fwhm10.0.fits \
    --skymodelderiv_sim skymodel_cache/sky_model_deriv_857GHz_nside2048_fwhm10.0.fits \
    --MC_start 0 \
    --MC_count 1 \
    --simulate_noise \
    --simulate_signal \
    --freq_sigma 0 \
    --out sim_0000
keskitalo commented 9 months ago

@Helbouha have you had a chance to test these modifications?

Helbouha commented 9 months ago

@keskitalo My test is failing with the following error: KeyError: 'Data buffer (nor alias) theta_857-1 does not exist', more specifically at this line

keskitalo commented 9 months ago

I don't quite understand the source of the failure. I added a critical fix to an unrelated issue. Can you please pull, recompile and run with --simulate_signal added to the earlier options.

Helbouha commented 9 months ago

I'm getting an Exception occurred: "Cannot load sky model, no file specified.", despite specifying skymodel in the options. I see in the log file however that skymodel_sim=None, skymodelderiv_sim=None could that be the issue?

keskitalo commented 9 months ago

My instructions above have a typo in them... Instead of

    --skymodel skymodel_cache/sky_model_857GHz_nside2048_fwhm10.0.fits \
    --skymodelderiv skymodel_cache/sky_model_deriv_857GHz_nside2048_fwhm10.0.fits \

You need

    --skymodel_sim skymodel_cache/sky_model_857GHz_nside2048_fwhm10.0.fits \
    --skymodelderiv_sim skymodel_cache/sky_model_deriv_857GHz_nside2048_fwhm10.0.fits \

I have no clue how the error got in there.

keskitalo commented 8 months ago

Are we ready to merge this PR?

Helbouha commented 8 months ago

Yes! It works fine, no objections on my part!