-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add 2D Gaussian fitter to qlook commands #190
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the update! I would like to ask you to fix the following things:
- Package imports (L30-32): We put standard library under
# standard library
and external dependencies under# dependencies
. Could you putimport copy
under# standard library
(L14) andfrom scipy.optimize import curve_fit
underfrom matplotlib.figure import Figure
(L28)? Also, could you removeimport pandas as pd
as it is not used anymore in this module? data[data != data] = 0.0
(L230, 489): Is it supposed to replace NaN values with zero? If so, could you consider to usedata[np.isnan(data)] = 0
as it is more intuitive?cont_fit = ...
(L255, 514): The variable namecont_fit
is a bit ambiguous becausecont
in this context sounds like not only continuum but also contours. Since this variable is not used throughout the function, could you simply remove this?- Code comments (L264-268, 523-527): Could you remove these lines? We manage the code changes by Git, so you do not need to leave the unused codes as comments.
- If-else block (L269-288, 528-547): You do not need to do this because
min_frequency
andmax_frequency
are strings with explicit units. You can simply code likef"min_frequency: {min_frequency}, max_frequency: {max_frequency}"
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the fix! Could you please fix the two minor remaining things?
- Could you put
import copy
just below# standard library
(L14)? In general,import something
should be placed abovefrom module import something
. - Could you remove
cont_fit
(L497)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much! It looks good for me, so I will merge it into main.
Closes #187.