-
Notifications
You must be signed in to change notification settings - Fork 6
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
Restructure plotframes.py #59
Comments
Reopening an issue basically means that the original issue was not fixed or that a code regression has caused a bug to reappear. In #49, a lot of it was fixed, and it is more appropriate to open individual issues on each of the remaining tasks. In fact, this issue itself could have been factored into 4 separate issues. I will start by taking a look at the |
The main restructure was done in #67. I still leave this open until utilities.py is cleaned. |
Fixed by #73 |
@weaverba137 I'd like now to restructure essentially the plotframes.py code in a new branch. On the other hand plotspecutils is largely redundant with plotframes. Does it make sense to fully merge both or do you want to keep them separate?
What do you think of the following:
Maybe first merge plotspecutils with plotframes? Looking at their diff, it looks easy. Maybe also find a different name: in the end, external users or scripts use eg "from prospect import MODULE" then "MODULE.plotspectra()".
Well, for this first step I'm not sure what to do.
Create few classes, one file/class, containing the main data in plotframes.plotspectra(). Once this is done, plotframes.plotspectra() should have a reasonable nb of code lines. Suggested classes, with the associated most important data:
cds_spectra
cds_model
cds_targetinfo
fig
data_lines
noise_lines
model_lines
zoomfig
imfig
emission/absorption lines (should be renamed)
ifiberslider (could we rename it to ispectrumslider ?)
smootherslider
prev/next_button
several z widgets
target info display
several VI widgets (may be an independent class)
Move remaining functions in plotframes.py to separate files (eg one file for emission/abs line functions).
I don't know what to do with the main. I would remove it entirely (there's no main in plotspecutils).
Remove unused functions in utilities.py
Originally posted by @armengau in #49 (comment)
The text was updated successfully, but these errors were encountered: