Skip to content

Conversation

@jemorrison
Copy link
Collaborator

@jemorrison jemorrison commented Sep 11, 2023

Resolves JP-2500

Closes #6697

This PR addresses allows the user to specify the tangent point (ra_center, dec_center), position angle (cube_pa) and size of cube in x cube dimension (nspax_xi) and y cube dimension (nspax_eta).
These are all option to be run offline not part of standard processing.

Checklist for maintainers

@jemorrison jemorrison requested a review from a team as a code owner September 11, 2023 21:00
@jemorrison
Copy link
Collaborator Author

@drlaw1558 Test this out and let me know what you think.
I am assuming a user provided ra_center or dec_center is just a smallish change to the current values. If a user gives a very large value (say at the edge of the cube) that becomes the tangent point. Cube build will try and create a cube with the center of the cube at this location. So there can be empty space where no data exist. This can be made smaller by sending in an nspax_xi or nspax_eta but if the tangent point at the edge there still will be empty space. But I am also assuming that most people will not do that and the ra,dec centers are moved just a little bit.
If this PR looks corrrect I will update the docs and add the new terms

@jemorrison jemorrison force-pushed the cube_build_tangent_point branch from 90e0b6a to 622eba9 Compare September 11, 2023 21:08
@codecov
Copy link

codecov bot commented Sep 11, 2023

Codecov Report

Patch coverage is 44.82% of modified lines.

Files Changed Coverage
jwst/cube_build/cube_build_step.py 20.00%
jwst/cube_build/ifu_cube.py 57.89%

📢 Thoughts on this report? Let us know!.

@jemorrison jemorrison added this to the Build 10.0 milestone Sep 11, 2023
Copy link
Collaborator

@drlaw1558 drlaw1558 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM; I tested each of these parameters and combinations thereof, and the results looked as expected. Needs a change log entry though.

@jemorrison
Copy link
Collaborator Author

I will update the documentation now. I just wanted to make sure the code looked correct before I did that.

@hbushouse
Copy link
Collaborator

@jemorrison Please run regression tests and post a link to the run here.

@jemorrison
Copy link
Collaborator Author

@drlaw1558 @hbushouse
Howard mentions in a comment about the use of xi and eta. I always think of the tangent plane projection in those coordinates but I realize we never have mentioned xi, eta in the documentation. Should I add a line or two describing that xi, eta are the tangent plane coordinates the cube is build on in the Terminology section of the description or should I change nspax_xi to nspax_x and nspax_eta to nspax_y and refer to those values as the x,y values in the tangent project ? And remove other references to xi and eta ?

@drlaw1558
Copy link
Collaborator

@jemorrison Hm, #7783 used the convention scalexy, so by analogy nspax_x and nspax_y would probably make sense. xi/eta and x/y aren't the same values so we need to keep both, but should be interchangeable from the standpoint of numbers of spaxels. That way we wouldn't have to describe xi/eta in anything other than inline documentation as this is just used internally as an intermediate step in the tangent plane projection.

@jemorrison jemorrison force-pushed the cube_build_tangent_point branch from 9674413 to 2d61856 Compare September 13, 2023 23:28
Copy link
Collaborator

@hbushouse hbushouse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now.

@hbushouse
Copy link
Collaborator

I started a regtest run here: https://plwishmaster.stsci.edu:8081/job/RT/job/JWST-Developers-Pull-Requests/932
Theoretically, since this update only involves params used by a user in off-line processing, it should have no effect at all on the regtests. Although perhaps someone should add a new test that utilizes these params.

@jemorrison
Copy link
Collaborator Author

I can add a regression test that sets the size of the cube. Cube build requires a full image to run so I could not figure out a way to test that in a unit test. But I can add a regression tests. I am hesitant to do that right now because of all the regression test failure to run.

@github-actions github-actions bot added regression_testing automation Continuous Integration (CI) and testing automation tools labels Sep 14, 2023
@jemorrison jemorrison force-pushed the cube_build_tangent_point branch from 6525585 to 8c88c91 Compare September 18, 2023 16:14
@github-actions github-actions bot removed regression_testing automation Continuous Integration (CI) and testing automation tools labels Sep 18, 2023
@jemorrison
Copy link
Collaborator Author

Results of regression test:
https://plwishmaster.stsci.edu:8081/job/RT/job/JWST-Developers-Pull-Requests/955/

@hbushouse is it ok to merge this - or should I wait since Build 10 is being made now ?

@hbushouse hbushouse merged commit 2144710 into spacetelescope:master Sep 18, 2023
mairanteodoro pushed a commit to mairanteodoro/jwst that referenced this pull request Sep 20, 2023
@jemorrison jemorrison deleted the cube_build_tangent_point branch November 19, 2024 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Specify tangent projection details for IFU spectral cubes

3 participants