b1quint / samfp-tools

Short scripts to process data obtained with SAM-FP at SOAR Telecope
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

phmxtractor won't run in calibration cubes with less than FSR #8

Closed b1quint closed 7 years ago

b1quint commented 7 years ago

Issue #6 was solved but that introduced a new bug where phmxtractor does not run if the data-cube does not has more than a FSR. Need to fix this.

b1quint commented 7 years ago

Here is the error message:

Finding reference pixel.
Reference pixel NOT found in header.
Trying to find the center of the rings.
Start center finding.

Traceback (most recent call last):
File "/home/bquint/bin/phmxtractor.py", line 1105, in <module> main()
File "/home/bquint/bin/phmxtractor.py", line 106, in main verbose=v, ref=args.ref, output=args.output
File "/home/bquint/bin/phmxtractor.py", line 574, in __init__ ref = self.find_reference_pixel()
File "/home/bquint/bin/phmxtractor.py", line 671, in find_reference_pixel 
    ref_x, ref_y = self.find_rings_center(self.fsr_channel)
File "/home/bquint/bin/phmxtractor.py", line 742, in find_rings_center
    temp_x = np.array(p.map(px, range(x.size)))
File "/home/bquint/anaconda2/lib/python2.7/multiprocessing/pool.py", line 251, in map
    return self.map_async(func, iterable, chunksize).get()
File "/home/bquint/anaconda2/lib/python2.7/multiprocessing/pool.py", line 567, in get
    raise self._value
ValueError: zero-size array to reduction operation minimum which has no identity

I have no idea how to solve this.