StellarCartography / pydis

DEPRECATED: Check out PyKOSMOS!
https://github.com/jradavenport/pykosmos
MIT License
43 stars 27 forks source link

Test: UT140701 ; using stdstar='' #20

Closed tdwilkinson closed 9 years ago

tdwilkinson commented 9 years ago
>>> spectra.autoreduce('objlist.txt','flatlist.txt','biaslist.txt','henear.0018r.fits',stdstar='')
Running HeNeAr_fit function.
Doing automatic wavelength calibration on HeNeAr.
Note, this is not very robust. Suggest you re-run with interac=True
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/astro/users/twilki/research/mdwarf/spectra/spectra.py", line 1190, in autoreduce
    display=displayHeNeAr, tol=HeNeAr_tol, fit_order=HeNeAr_order)
  File "/astro/users/twilki/research/mdwarf/spectra/spectra.py", line 833, in HeNeAr_fit
    popt,pcov = curve_fit(_gaus, xline, yline, p0=pguess)
  File "/astro/apps6/anaconda/lib/python2.7/site-packages/scipy/optimize/minpack.py", line 586, in curve_fit
    raise RuntimeError(msg)
RuntimeError: Optimal parameters not found: Number of calls to function has reached maxfev = 1000.

Not sure what the issue is here. Looks like it doesn't like the curve fit function?

jradavenport commented 9 years ago

This is a failing of the terrible HeNeAr auto-fit, which works especially bad on DIS-low... I'm not quite sure why this particular crash happened, but it's probably making a bad guess as the wavelength of a HeNeAr line near one side of the chip.

I vote we don't fix this, because the HeNeAr auto is so shitty it's not worth fixing.

Suggest you set HeNeAr_interac=True, which I have just switched to the default setting. Identify as many lines as you can, and it will save an output file that stores the locations of the lines you identified. On subsequent runs of this night, you can then use these previous identifications by setting HeNeAr_prev=True