Skip to content

Minor: integer overflow error #14

@keflavich

Description

@keflavich

I encountered this error running on one image:

  File "//orange/adamginsburg/jwst/brick/analysis/crowdsource_catalogs_long.py", line 419, in main
    results_blur  = fit_im(np.nan_to_num(data), psf_model_blur, weight=weight,
  File "/blue/adamginsburg/adamginsburg/repos/crowdsource/crowdsource/crowdsource_base.py", line 839, in fit_im
    tflux, tmodel, tmsky = fit_once(
  File "/blue/adamginsburg/adamginsburg/repos/crowdsource/crowdsource/crowdsource_base.py", line 300, in fit_once
    xloc = numpy.zeros(repeat*numpy.sum(sz*sz).astype('i4') +
ValueError: negative dimensions are not allowed

a bit of digging shows that it's an integer overflow error:

ipdb> numpy.sum(sz*sz)
7866546941
ipdb> numpy.sum(sz*sz).astype('i4')
-723387651

I have 595,000 stars with 149x149 pix PSFs, apparently.

I'm going to try this with i8 in place of i4, but I suspect I'll run out of memory.

I'm posting this mostly in case someone else hits the same error; it's kind of obvious when you dig a tiny bit, but I didn't see it at first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions