Project

General

Profile

Bug #4289

Cycle bug in MSR

Added by Ben Hambrecht over 6 years ago.

Status:
New
Priority:
Urgent
Assignee:
Start date:
07/03/2013
Due date:
% Done:

0%

Estimated time:
Duration:

Description

The cycle implementation (printing only every N-th galaxy) is faulty. The variable cycle can become 0 and shouldn't.

---------------------------------------------------------------------------
ZeroDivisionError                         Traceback (most recent call last)
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/utils/py3compat.pyc in execfile(fname, *where)
    176             else:
    177                 filename = fname
--> 178             __builtin__.execfile(filename, *where)

/Users/ben/Documents/DESpec/repo/despec/07-MeasureSpectroscopicRedshift/MeasureSpectroscopicRedshift_Hambrecht2/MeasureSpectroscopicRedshift.py in <module>()
    418                 z_spec_list[n] = measure_redshift(wavelength_loggrid,noisy_spectrum,wavelength_grid,eigentemplates,wavelength_template_grid,weights,z_true_cropped[n],z_photo_cropped[n])
    419 
--> 420                 if (n % cyclenumber == 0) : print n + 1, "out of", numberOfSpectra, "spectra done" 
    421 
    422 

ZeroDivisionError: integer division or modulo by zero


Also available in: Atom PDF