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

IndexError after running a Sequence #138

Closed
mathtimm opened this issue Oct 11, 2023 · 0 comments
Closed

IndexError after running a Sequence #138

mathtimm opened this issue Oct 11, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@mathtimm
Copy link
Collaborator

mathtimm commented Oct 11, 2023

An IndexError appears after running the following sequence on a set of images:

faster_photometry = SequenceParallel(
    [
        blocks.Calibration(darks=darks, bias=bias, flats=flats, shared=True),
        blocks.PointSourceDetection(
            n=12, minor_length=8
        ),  # stars detection for alignment
        blocks.Cutouts(21),  # stars cutoutsb
        blocks.MedianEPSF(),  # building EPSF
        blocks.Gaussian2D(ref),  # modeling EPSF with initial guess
        blocks.ComputeTransformTwirl(ref),  # compute alignment
        blocks.AlignReferenceSources(ref),  # align sources
        blocks.CentroidQuadratic(),  # centroiding
        blocks.AperturePhotometry(),  # aperture photometry
        blocks.AnnulusBackground(),  # annulus background
        blocks.Del("data", "sources", "cutouts"),  # (optional) reduce overhead
        blocks.GetFluxes(
            "fwhm",
            airmass=lambda im: im.header["AIRMASS"],
            dx=lambda im: im.transform.translation[0],
            dy=lambda im: im.transform.translation[1],
        ),
    ],
)

faster_photometry.run(images[30:40])

image

After trying the debugging recommendations, it appears the error comes from GetFluxes.terminate().

Adding a Trim block removed the overscan regions of the raw images that were preventing the detection of stars and causing the issue.

image

@mathtimm mathtimm added the bug Something isn't working label Oct 11, 2023
lgrcia added a commit that referenced this issue Oct 12, 2023
…r empty fluxes + terminate exception context
lgrcia added a commit that referenced this issue Oct 12, 2023
fix(#138): sequence warning before terminate + getfluxes exception fo…
@lgrcia lgrcia closed this as completed Nov 28, 2023
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

No branches or pull requests

2 participants