-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Direction dependent degrid with region files #115
Comments
I think this works as advertised, at least it does on my simulated data. There is something I don't quite understand though viz. when converting the regions to masks I need to do the following pixel_region = region.to_pixel(wcs)
region_mask = pixel_region.to_mask().to_image((ny, nx))
region_mask = region_mask.T i.e. I need a transpose. I suspect this has got something to do with the wgridder conventions that are being used here pfb-imaging/pfb/operators/gridder.py Line 24 in 94b36ec
but I'm not going to dig into that at this point. Note that the current implementation is a bit wasteful in that it just degrids the full image after zeroing components outside of the mask. We could improve this by only degridding the region (i.e. a smaller image) but that requires specifying the center of the region and therefore also getting the conventions to line up |
Thanks for the feature @landmanbester - I will try the branch out and if I run into issues will message you on chat...thanks again. |
I started adding support for degridding different regions to separate columns in the
ddpredict
branch. The way I set it up is to pass in a single region file possibly containing multiple regions. The number of columns that will end up in the MS is 1 + the number of regions in the file. The part of the model not contained in any regions will be written tomodel-column
and each region will go intof'{model-column}{i}'
withi
labelling the region number. Overlapping regions are not supported and thedegrid
application should raise an error if this is detected. I am open to suggestions for modifications/additions to this functionality.@bngcebetsha note if you are using CORRECTED_DATA you should be able to subtract part of the model by running the
init
application with--data-column 'CORRECTED_DATA - MODEL_COLUMN_TO_SUBTRACT'
. I haven't yet added functionality to subtract multiple columns or do on the fly gain application in this case. You will need to use QuartiCal if you need to do thatThe text was updated successfully, but these errors were encountered: