jjtobin / auto_selfcal

MIT License
17 stars 8 forks source link

Skip inf in the event of two scans with one much longer than the other #35

Closed psheehan closed 8 months ago

psheehan commented 8 months ago

I've noticed that selfcal can sometimes have issues when it runs into a dataset where a target has a long scan followed by a much shorter scan. I suspect the issue arises because applycal ends up interpolating between gaincal solutions derived from very different averaging times, though I don't know this for certain. One solution to this issue that appears to work is to skip the inf solint such that it goes straight to dividing up the longer scan into several intervals.

As this PR currently stands, it explicitly looks for cases where there are two scans, though I wonder if it makes sense to extend to any case where max_scan_time >> min_scan_time? Possibly something to think about.

And there should be time as it currently cannot be merged automatically. << Fixed