Skip to content
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

An offset in the offset axis of a PV image generated with fixed angular separation #1038

Closed
kswang1029 opened this issue Mar 9, 2022 · 6 comments · Fixed by #1020
Closed
Assignees
Labels
bug Something isn't working

Comments

@kswang1029
Copy link
Contributor

With a test wide field image cube, if the pv cut is sampled with fixed pixel separation, the origin of the offset axis is correct as
Gaussian_array_wide fits-Gaussian_array_wide_pv fits-image-2022-03-09-15-31-56

However, if we simply increase the pv cut of the above example so that it is sampled with fixed angular separation, there seems to have an offset in the offset axis of the pv image as
Gaussian_array_wide fits-Gaussian_array_wide_pv fits-image-2022-03-09-15-31-27

We can see the origin of the offset axis does not overlay with the peak emission of the central gaussian source.

@pford do you have any idea on this? Could it be due to the precision issue when converting pixel coordinate to world coordinate in such noticeably distorted sky field?

@kswang1029 kswang1029 added the question Further information is requested label Mar 9, 2022
@pford
Copy link
Collaborator

pford commented Mar 9, 2022

@kswang1029 offset 0 is at the angular center of the line, then the pos/neg offsets are calculated from there. So angular center != pixel center shown on image.

@pford
Copy link
Collaborator

pford commented Mar 9, 2022

I think if we use the pixel center of the line, then to make offset 0 at the center of the PV image we will either go past the end of the line on one side or not reach the end of the line on the other side.

@kswang1029
Copy link
Contributor Author

kswang1029 commented Mar 10, 2022

I think if we use the pixel center of the line, then to make offset 0 at the center of the PV image we will either go past the end of the line on one side or not reach the end of the line on the other side.

I suggest we align the pixel center of the line and the origin of the offset axis as mostly the center and origin serve as the references when users analyze emission structures and kinematics. This is also ensure consistency of visualization of the center of the line and the origin of the offset axis in the pv image.

Regarding the sampling near the two ends of the line, it is okay to go pass the end or not reach the end by half of a step. Mostly users will just focus on features around the center of the offset axis. If the edge features are important, users can just make the line longer and regenerate a pv image for analysis.

@kswang1029 kswang1029 removed the question Further information is requested label Mar 17, 2022
@pford
Copy link
Collaborator

pford commented Mar 17, 2022

The profiles generated for the PV image (all channels) currently use the same code as the line/polyline spatial profiles (current channel). Should the pixel center of the line be used for the both the PV generator and the spatial profiles? I believe the plan is to eventually support PV images from a polyline as well.

The issue with the polyline is that using the pixel center of each line, you may not reach the "vertex" end of the line, resulting in gaps, or overreach the vertex, adding profiles not in the polyline. I can adjust each line to reach the "vertex end" within half a step and lengthen/shorten the other end, but what to do with the middle line in a 3-segment polyline where you have to choose which vertex end to reach?

@pford
Copy link
Collaborator

pford commented Mar 17, 2022

I am planning to fix this issue in the branch for line spatial profiles while I am modifying the fixed angular profiles code for polyline support.

In effect, a line is a polyline with one line segment. Each line segment is handled individually because each has its own rotation angle, used to determine the points along the line where the box regions are created for the profiles.

But perhaps polylines should be treated differently, and just go from start to end rather than from the center out in each line segment since there is no "line center".

@kswang1029
Copy link
Contributor Author

@pford retested with the branch pam/796_line_profile and the issue is fixed. Thanks for addressing this 👍 . This issue can be closed once pam/796_line_profile is merged in.

@kswang1029 kswang1029 added the bug Something isn't working label May 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants