Conversation
…2radian hardcoded in lat model.
… have a huge fraction of turnarounds
| passes.append(entry) | ||
| return passes | ||
|
|
||
| def distribute_tods_ra(obsinfo, nsplit, site="so", weather="typical"): |
There was a problem hiding this comment.
How would this work if site="so_lat" instead?
There was a problem hiding this comment.
This function is a perfect candidate for a unit test.
There was a problem hiding this comment.
but we run it with so_lat in the ML mapmaker. This is a general function so it doesn't matter if the default is so. The difference is tiny.
There was a problem hiding this comment.
Aren't we supposed to support ACT data as well with SO tools?
| parser.add_argument( "--sun-mask", type=str, default="/global/cfs/cdirs/sobs/users/sigurdkn/masks/sidelobe/sun.fits", help="Location of Sun sidelobe mask") | ||
| parser.add_argument( "--moon-mask", type=str, default="/global/cfs/cdirs/sobs/users/sigurdkn/masks/sidelobe/moon.fits", help="Location of Moon sidelobe mask") |
There was a problem hiding this comment.
If I run this anywhere apart from NERSC it will fail. If these inputs are required, remove the defaults and make them require=True
There was a problem hiding this comment.
There is some niceness to defaults that work easily...
I would advocate for the following:
- Change
sidelobes.get_cutsto take the path to a directory where it searches for files with the names{obj_name}.fitsfor everything inobject_list - Make
object_lista cli argument that defaults to[sun, moon]and pass it intosidelobes.get_cuts - Take in the directory to look for files in as a CLI argument but dont require it or set a default
- If the directory is not passed do something sane to set the default in a what that isn't computer dependent. I would either:
- Have it assume some relative path like
masks/sidelobe(lame and probably not a useful default in most cases) - Have it grab the path to the metadata directory (by looking at where context says the obsdb is) and assuming a path relative to that (ie:
{metadata_dir}/masks/sidelobe) and we put the current nominal masks there.
- Have it assume some relative path like
That way we end up with a system that doesn't rely on hardcoded paths but is easy to override as needed.
Probably too involved for this PR as it should be merged soon since its been hanging around for a while, but just throwing that out there as an option for future changes.
For now I think its fine that is will crash outside of NERSC, we can just add a warning to the help message that the defaults are for NERSC or something.
|
|
||
| def find_usable_detectors(obs, maxcut=0.1, glitch_flags: str = "flags.glitch_flags"): | ||
| ncut = rangemat_sum(obs[glitch_flags]) | ||
| def find_usable_detectors(obs, maxcut=0.1, glitch_flags: str = "flags.glitch_flags", to_null : str = "flags.expected_flags"): |
| return sub_ids | ||
|
|
||
| def filter_subids(subids, wafers=None, bands=None): | ||
| def filter_subids(subids, wafers=None, bands=None, ots=None): |
| sub_ids = expand_ids(sub_ids, context=context) | ||
| return sub_ids | ||
|
|
||
| def get_obsinfo_subids(subids, context): |
|
@mhasself there are still a couple of pending issues and unit tests, but you can start to have a look. Thanks! |
…anks to Bai-Chiang for finding this
* Better control over map vs. tod units * Fix implementation of Jon's noise model. The step where previous eigenvectors were projected out from the covmat used the wrong formula. Also simplified the internal normalization, though this doesn't change anything. Added NmatDebug too. Sotodlib and sogma still don't match when both use Jon's noise model. Currently sotodlib looks quite a bit better
This implements the preprocessing module for loading obs into the ml mapmaker, which requires to run preprocessing previously. The idea is to run with LAT data and leave the absolute minimum required preprocessing in this code, and we will remove that eventually