Skip to content

Platescale conversion and trace_maxshift param in echelle object finding#2128

Open
debora-pe wants to merge 6 commits into
developfrom
ech_pscale_issue
Open

Platescale conversion and trace_maxshift param in echelle object finding#2128
debora-pe wants to merge 6 commits into
developfrom
ech_pscale_issue

Conversation

@debora-pe

@debora-pe debora-pe commented May 20, 2026

Copy link
Copy Markdown
Collaborator
  • During object finding, for objects which were only found on some orders, a trace is also added in orders where the objects were not found. Values from the nearest detected order are used to filled out the missing objects, but for spectrographs with different platescale per order, the pixel values will be different in arcsec. This PR fixes this inconsistency, by scaling the pixel values, such as FWHM, maskwidth, and BOX_R_PIX, to keep consistent arcsec values throughout all the orders.

  • The parameter trace_maxshift is now also used by echelle findobj methods, which can help to limit centroid shifts during iterative trace refinement, if more than one trace are present.

Tests have been added in the Dev-Suite here: pypeit/PypeIt-development-suite#407

@debora-pe debora-pe added bug Bug fix. Echelle Specific to echelle spectrographs labels May 20, 2026
@debora-pe debora-pe added this to the v2.1.0 milestone May 20, 2026
Comment thread pypeit/core/findobj_skymask.py
Comment thread pypeit/core/findobj_skymask.py
@debora-pe

Copy link
Copy Markdown
Collaborator Author

Run the tests. There are some problems that are not related to this PR.

Test Summary
--------------------------------------------------------
--- PYTEST PYPEIT UNIT TESTS PASSED  353 passed, 448 warnings in 308.79s (0:05:08) ---
--- PYTEST UNIT TESTS PASSED  158 passed, 1449 warnings in 841.03s (0:14:01) ---
--- PYTEST VET TESTS FAILED  4 failed, 73 passed, 2392 warnings in 6365.94s (1:46:05) ---
--- PYPEIT DEVELOPMENT SUITE FAILED 2/299 TESTS  ---
Failed tests:
    vlt_xshooter/NIR_LTT3218 pypeit
    vlt_xshooter/NIR_LTT3218 pypeit_sensfunc
Skipped tests:
    vlt_xshooter/NIR_LTT3218 pypeit_sensfunc
Total disk usage: 239.197 GiB
Testing Started at 2026-05-20T10:34:49.011633
Testing Completed at 2026-05-21T04:40:02.510614
Total Time: 18:05:13.498981
  • The vlt_xshooter/NIR_LTT3218 happened because the data disappeared from the Google Drive
  • 2 of the failed vet tests are due to not having reduced spec1d/spec2d files from vlt_xshooter/NIR_LTT3218
FAILED ../test_echelles.py::test_vlt_xshooter_orders - AssertionError: No spec2d files found for NIR_LTT3218 and instr=vlt_xshooter
FAILED ../test_flux_coadd1d.py::test_feige110_ltt3218 - AssertionError: Missing spec1d file matching NIR_LTT3218/Science/spec1d_*13.970*.fits
  • 1 failed vet tests is the usual ghost on my machine.
    FAILED ../test_scripts.py::test_identify - AssertionError: Bad auto ID
  • last vet test failure does not seem related to this PR and it's just affected by a rounding errror.
    FAILED ../test_coadd2d.py::test_offsets_with_user_obj_ids - AssertionError: Wrong offsets
# Check the offsets
>       assert np.allclose(coadd.offsets, [0.0, 1.29, 3.91], atol=0.01), 'Wrong offsets'
E       AssertionError: Wrong offsets
E       assert False
E        +  where False = <function allclose at 0x10e2f1570>(array([0.        , 1.2925859 , 3.89875071]), [0.0, 1.29, 3.91], atol=0.01)
E        +    where <function allclose at 0x10e2f1570> = np.allclose
E        +    and   array([0.        , 1.2925859 , 3.89875071]) = <pypeit.coadd2d.MultiSlitCoAdd2D object at 0x11f860a50>.offsets

@profxj profxj self-requested a review May 24, 2026 13:55

@profxj profxj left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

looks good to me, thanks

@kbwestfall

Copy link
Copy Markdown
Collaborator

It's annoying that the data went away! Does anyone have a local copy? I do not.

Was the data deleted because it's owned by silvia.onorato96 ?

@kbwestfall kbwestfall left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Great! No comments from me, but I agree with everything Brad said, so I'm requesting changes.

@kbwestfall kbwestfall left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think I've now addressed Brad's comments.

Comment thread pypeit/core/findobj_skymask.py
Comment thread pypeit/core/findobj_skymask.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Bug fix. Echelle Specific to echelle spectrographs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants