-
Notifications
You must be signed in to change notification settings - Fork 10
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
in-house implementation of a pv image generator #794
Comments
I am going to make a mock-up script in python about the way of sampling a pv cut with fixed angular separation. This should help avoiding using tabular axis in the header. Will report back in a day or so |
I made a mockup script in python to sample a pv cut with fixed angular separation along the cut. The idea seems feasible but the performance may not be good enough. I put a quick summary of the idea in the attached slides. Please let me know if you have better ideas @pford @veggiesaurus |
@kswang1029 @pford I presume this needs to be moved to the beta 2 milestone? |
@kswang1029 during testing I have produced pv images which are the mirror of images produced by casa impv. The case shown below is like the example in the requirements doc BUT it has the line start at the upper right (positive offset) and line end at lower left (negative offset). so one would expect higher values in the pv image at the negative offset end, correct? This is what my image does, but casa has the higher values at the positive offset end. The image has only one channel. impv(imagename='casa_wideField.fits', outfile='widefield_impv_pv.im', mode='coords', start=[2335, 1650], end=[1800, 1200], width=3) Shown: original image with line, carta pv image, casa impv image. |
@kswang1029 in the previous example, if I reverse the impv start and end points, I get the same image as carta. I tried to see whether the casaviewer is consistent with impv for this image, but the pV tab in the Regions panel is blank! However, with the HD163296 image in the requirements doc, I get the same (pos/neg-oriented) pv image in carta and casa, and the same pv image in carta and casa if I reverse the start and end points. I could not find anything in casadocs explaining how the offset directions were determined. |
The reason why we cannot re-use the code of casa-impv for the pv image generation is performance. casa-impv attempts to generate a rotated cube first so that the pv cut is either vertical or horizontal before actual image slicing. This is a slow process and seems unnecessary and does not scale well when image cube becomes larger.
A more scalable approach (and cancellable) is to sample the pv cut as a series of rectangle regions with 1 x cut_width (default 3pix) shape and request region spectral profiles to form a 2D image. Based on the experiments with astropy, we see at least an order of magnitude performance boost. This approach can be also used to support generating a pv image along a polyline (hence an arbitrary curve).
Once uncertainty of this proposed approach is how we form a proper header for the offset axis, especially when projection effect is not negligible.
Science requirements: https://docs.google.com/document/d/1Z1fCDj9IujGvV6ER_bzjjL2j_bF5ykc34GRhPdOiXI4/edit
The text was updated successfully, but these errors were encountered: