Skip to content

Notebooks not up to date + minor errors #29

@maxime-rey

Description

@maxime-rey

Hi, while trying to figure out how spectractor works, I noticed that the notebook weren't up to date.
If I'm not mistaken:

  • In most of them there are the following lines but "../styles/custom.css" doesn't seem to exist.
from IPython.core.display import HTML
def css_styling():
    styles = open("../styles/custom.css", "r").read()
    return HTML(styles)
css_styling()
  • In Run_SpectractorSim.ipynb, the imports should be changed to the following (however, I haven't found what replaced those commented out).
from spectractor.tools import *
#from holo_specs import *
from spectractor.extractor.targets import *
#from optics import *
import spectractor.parameters 

       Furthermore, in the definition of df in the Logbook part, I think that in the files name should be
       'v5' instead of 'v3'. Nonetheless, there is still the error
       ParserError: Error tokenizing data. C error: Expected 5 fields in line 1657, saw 6
       for which I haven't found the solution.

  • In Spectractor tutorial.ipynb, the imports should be as shown below.
    Also, it seems that spec.plot_spectrum(fit=True) should be replace by spec.plot_spectrum(live_fit=True) and the print are still in Python 2.
from spectractor.extractor.extractor import Spectractor 
from spectractor.extractor.spectrum import Spectrum
import spectractor.parameters as parameters 
  • From these I also saw another problems in extractor.py. It should be def Spectractor(config='../config/ctio.ini') instead of def Spectractor(config='./config/ctio.ini').

I hope I didn't say anything stupid and that it helps !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions