hpc4cmb / toast

Time Ordered Astrophysics Scalable Tools
Other
44 stars 39 forks source link

fixing bugs on CosmicRays, GainDrifts & GainScrambler #611

Closed giuspugl closed 2 years ago

giuspugl commented 2 years ago

the rng operator is intialized with integers like https://github.com/hpc4cmb/toast/blob/44d9f84ecc28752de2028cf3f402891ba34a1049/src/toast/ops/gainscrambler.py#L75 , in particular the variable counter2 was initialized to the detector index detindx but it relies on the fact that the uid is integer, which is not always the case. for time being i am enumerating the list of the detectors and set detindx from there: https://github.com/hpc4cmb/toast/blob/ebbfae8409f81ce767b9644950c82c02d6220bd7/src/toast/ops/gainscrambler.py#L79

Any smarter idea?

giuspugl commented 2 years ago

The tests aren't passing because of the callable trait responsivity_function . This PR aims at addressing also that.

giuspugl commented 2 years ago

after a chat with @tskisner , the proposed solution for this issue, is to keep the current interface for the two operators relying on generating random numbers from the detector_data ['uid'] whilst making sure that the uid is generated by toast in case the IMO file wouldn't provide it. We will open a new PR to fix the responsivity_function callable trait issue .