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

Library plot in docs #26

Open
petigura opened this issue Jan 24, 2017 · 1 comment
Open

Library plot in docs #26

petigura opened this issue Jan 24, 2017 · 1 comment

Comments

@petigura
Copy link
Collaborator

The documentation seem to refer to an old version of the library. We don't use the casagrande parameters any more.

image

@petigura
Copy link
Collaborator Author

petigura commented Feb 4, 2017

@samuelyeewl:

I tried updating the plots in the docs by running quickstart.py. I was able to regenerate the library plot:

quickstart-library-labeled

But the quickstart.py The code failed here:

139  	                if idx is not None:
140  	                    shift_specs.append(self.lib.get_spectrum(idx))
141  	
142  	        # Use the bootstrap shift approach
143  	        self.target = shift.bootstrap_shift(self.target_unshifted, shift_specs,
144  ->	                                            store=self.shift_data)
145  	
146  	        self.shift_ref = shift_specs[self.shift_data['shift_reference']]
147  	
148  	        self._shifted = True
149  	        return self.target

With the following error message.

Shifting spectrum HD190406
Attempting shift to spectrum NSO, median cross-correlation peak = 2.60
Traceback (most recent call last):
  File "/Users/petigura/anaconda/lib/python2.7/pdb.py", line 1314, in main
    pdb._runscript(mainpyfile)
  File "/Users/petigura/anaconda/lib/python2.7/pdb.py", line 1233, in _runscript
    self.run(statement)
  File "/Users/petigura/anaconda/lib/python2.7/bdb.py", line 400, in run
    exec cmd in globals, locals
  File "<string>", line 1, in <module>
  File "quickstart.py", line 2, in <module>
    import pandas as pd
  File "/Users/petigura/anaconda/lib/python2.7/site-packages/specmatchemp/specmatch.py", line 144, in shift
    store=self.shift_data)
  File "/Users/petigura/anaconda/lib/python2.7/site-packages/specmatchemp/shift.py", line 56, in bootstrap_shift
    shift(targ_cut, ref, store=shift_data)
  File "/Users/petigura/anaconda/lib/python2.7/site-packages/specmatchemp/shift.py", line 260, in shift
    args=(center_pix, lags), loss='cauchy')
  File "/Users/petigura/anaconda/lib/python2.7/site-packages/scipy/optimize/_lsq/least_squares.py", line 775, in least_squares
    raise ValueError("Residuals are not finite in the initial point.")

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