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

CreateVariance ZeroDivision error #36

Open
knordsieck opened this issue Jun 21, 2016 · 1 comment
Open

CreateVariance ZeroDivision error #36

knordsieck opened this issue Jun 21, 2016 · 1 comment

Comments

@knordsieck
Copy link
Collaborator

Steve-

Here is my latest problem. I presume it is a header problem, since it is old data, but the bpP file generated has the GAIN and RDNOISE parameters set properly, so I don't immediately see:

IMRED
infile_list=['../raw/P201106130013.fits', '../raw/P201106130014.fits', '../raw/P201106130015.fits', '../raw/P201106130016.fits', '../raw/P201106130017.fits', '../raw/P201106130018.fits', '../raw/P201106130019.fits', '../raw/P201106130020.fits', '../raw/P201106130021.fits', '../raw/P201106130030.fits', '../raw/P201106130031.fits', '../raw/P201106130032.fits', '../raw/P201106130033.fits', '../raw/P201106130034.fits', '../raw/P201106130035.fits', '../raw/P201106130036.fits', '../raw/P201106130037.fits', '../raw/P201106130038.fits', '../raw/P201106130039.fits', '../raw/P201106130040.fits', '../raw/P201106130041.fits', '../raw/P201106130042.fits', '../raw/P201106130043.fits', '../raw/P201106130044.fits', '../raw/P201106130045.fits', '../raw/P201106130046.fits', '../raw/P201106130047.fits', '../raw/P201106130048.fits', '../raw/P201106130049.fits', '../raw/P201106130050.fits', '../raw/P201106130051.fits', '../raw/P201106130052.fits', '../raw/P201106130053.fits', '../raw/P201106130054.fits', '../raw/P201106130055.fits', '../raw/P201106130056.fits', '../raw/P201106130057.fits', '../raw/P201106130058.fits', '../raw/P201106130059.fits', '../raw/P201106130060.fits', '../raw/P201106130061.fits', '../raw/P201106130062.fits', '../raw/P201106130063.fits', '../raw/P201106130064.fits', '../raw/P201106130065.fits', '../raw/P201106130066.fits', '../raw/P201106130067.fits', '../raw/P201106130068.fits', '../raw/P201106130069.fits', '../raw/P201106130070.fits', '../raw/P201106130071.fits', '../raw/P201106130072.fits', '../raw/P201106130073.fits', '../raw/P201106130074.fits', '../raw/P201106130075.fits', '../raw/P201106130076.fits', '../raw/P201106130077.fits', '../raw/P201106130096.fits', '../raw/P201106130097.fits', '../raw/P201106130098.fits', '../raw/P201106130099.fits', '../raw/P201106130100.fits', '../raw/P201106130101.fits', '../raw/P201106130102.fits', '../raw/P201106130103.fits', '../raw/P201106130104.fits', '../raw/P201106130105.fits', '../raw/P201106130106.fits', '../raw/P201106130107.fits', '../raw/P201106130108.fits', '../raw/P201106130109.fits', '../raw/P201106130110.fits', '../raw/P201106130111.fits', '../raw/P201106130112.fits', '../raw/P201106130113.fits', '../raw/P201106130114.fits', '../raw/P201106130115.fits', '../raw/P201106130116.fits', '../raw/P201106130117.fits', '../raw/P201106130118.fits', '../raw/P201106130119.fits']
prodir=./
bpmfile=/d/carol/Synched/software/SALT/polsaltcopy/polsalt/data/bpm_rss_11.fits
gaindb=None cleanup=True

2016-06-20 21:11:26 MESSAGE ------------------------------------------
Starting imred

Pysalt Version: v0.5dev

 --------------------------------------------------
                     HDU Overscan Order  RMS  Niter
 --------------------------------------------------
   P201106130013.fits[1]   275.77   5    0.36  10
   P201106130013.fits[2]   277.69   5    0.39  10
   P201106130013.fits[3]   279.96   5    0.20  10
   P201106130013.fits[4]   278.27   5    0.28  10
   P201106130013.fits[5]   281.53   5    0.24  10
   P201106130013.fits[6]   286.58   5    0.28  10
   P201106130013.fits[7]   275.54   5    0.40  10
   P201106130013.fits[8]   277.49   5    0.31  10
   P201106130013.fits[9]   279.37   5    0.24  10
   P201106130013.fits[10]   277.86   5    0.35  10
   P201106130013.fits[11]   281.10   5    0.28  10
   P201106130013.fits[12]   286.02   5    0.26  10

2016-06-20 21:11:28 ERROR --------------------------------------------
float division by zero
Traceback (most recent call last):
File "/usr/users/brian/sal/brian/iraf/RSS/salt/pysalt/lib/saltsafelog.py", line 196, in logging
yield log
File "/d/carol/Synched/software/SALT/polsaltcopy/polsalt/imred.py", line 92, in imred
hdu = add_variance(hdu, badpixelstruct)
File "/d/carol/Synched/software/SALT/polsaltcopy/polsalt/imred.py", line 177, in add_variance
hdu=CreateVariance(struct[i], i, nextend+i)
File "/usr/users/brian/sal/brian/iraf/RSS/salt/pysalt/saltred/saltprepare.py", line 199, in CreateVariance
data=(data+(rdnoise/gain)**2)
ZeroDivisionError: float division by zero

2016-06-20 21:11:28 MESSAGE ------------------------------------------
imred aborted
P201106130013.zip

@knordsieck
Copy link
Collaborator Author

Aha! This is windowed data. There are 12 extensions, the first 6 being the bottom (O) beam and the next 6 being the top (E) beam. I will see if imred and correct_files can be made to do this without mucking with your deeper routines, otherwise I may be asking for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant