Project

General

Profile

Bug #3617

measure redshift breaks.

Added by Brian Nord over 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Immediate
Assignee:
Category:
Measure Redshift
Target version:
Start date:
03/25/2013
Due date:
% Done:

0%

Estimated time:
Duration:

Description

Using SGSO_Random ....

===============================
entering Sim_Gal_Spec_Observed ===============================
... Imported from data bank
... plotting basic diagnostics
... plot saved to ./Figures/Galaxy_Spectrum_Observed_flux0.png
... Sim_Gal_Spec_Observed finished in 3.11 seconds
... running Measure_Redshift
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pyfits/__init__.py:6: UserWarning: Module readline was already imported from /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/utils/rlineimpl.pyc, but /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/readline is being added to sys.path
import pkg_resources =========================
entering Measure_Redshift =========================
wave range 5500 15000
inds 1 96
shape before
(97, 27330)
(97, 27330)

shape after
(95, 27330)
(97, 95)
---------------------------------------------------------------------------
ValueError 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/bnord/Cosmo/Projects/spokes/source/Measure_Redshift/Measure_Redshift_New/measure_redshift.py in <module>()
281
282
--> 283 z_spec = measure_redshift(spectra,wavelength_grid,eigentemplates,weights,z_true)
284
285

/Users/bnord/Cosmo/Projects/spokes/source/Measure_Redshift/Measure_Redshift_New/measure_redshift.py in measure_redshift(spectra, wavelength_grid, eigentemplates, weights, z_true)
67 numberOfSpectra = spectra.shape0
68 new_grid = numpy.zeros(grid_size+1)
---> 69 new_grid[:grid_size] = wavelength_grid
70 new_grid[-1] = wavelength_loggrid[-1]
71

ValueError: operands could not be broadcast together with shapes (95) (95,27330)
... Measure_Redshift finished in 2.71 seconds

History

#1 Updated by Ben Hambrecht over 7 years ago

  • Status changed from Assigned to Resolved

Fixed. MR now handles single and multiple wavelength grids.

#2 Updated by Brian Nord about 7 years ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF