Add possibility to convert Non Linearity factor from 1/K to 1/SR#524
Add possibility to convert Non Linearity factor from 1/K to 1/SR#524mj-gomes wants to merge 6 commits into
Conversation
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hi @mj-gomes, these changes look fine to me. I believe that this information should definitely be included in the report! In this way, whoever reads it can check if the units were used consistently. I would add an item about Thanks! |
It's done. It's the first time I deal with the append_to_report method, but from what I understand it is sufficient adding conv_K_to_SR as an argument, since the method deals automatically with the kwargs. Is this correct? If so, I would say this can be merged (in any case it does not introduce breaking changes to anything already implemented). |
Partially, but this is not enough to make the value of the parameter appear in the report. Internally, LBS uses the Jinja2 template engine to produce the Markdown reports, so you must make sure that the new variable appears somewhere in the final report. Take a look at litebird_sim/templates/report_mpi.md: it uses the variables BTW, I couldn’t find any template report for the HWP non-linearity module in the templates folder, so you should probably create one first. |
This is one other feature that I had been using in the HWP simulations and that was not yet in lbs.
It allows to pass a flag to
sim.apply_quadratic_nonlinto convert the non linearity factor (g) from 1/K to 1/SR (spectral radiance units), so that we keep coherent units when computing the TOD in spectral radiance units and then inserting the non linearity effect on it.Should we also make this information (the conversion flag and also the sampled value for the non linearity factor) available in the automatic output simulation report?