-
Notifications
You must be signed in to change notification settings - Fork 1
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
Finish most of the preprocess #2
base: main
Are you sure you want to change the base?
Conversation
preprocess.py
Outdated
@@ -16,7 +16,13 @@ | |||
|
|||
def overlap(sightline, data:DesiMock, id): | |||
''' | |||
here sightline = data.get_sightline(id=id) | |||
Deal with the overlapping area between different cameras so that the result will not contain the overlaps. |
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.
- please move
get_split_point
andget_between
outside theoverlap
function - documents are required for
get_split_point
andget_between
function - have you ever visually tested for a large number of mock spectra that using the average points to split the two camera is correct, i.e., no wired features?
preprocess.py
Outdated
@@ -101,9 +107,18 @@ def get_between(array, max, min, maxif=False, minif=False): | |||
# plt.plot(wavs_new[zero_point:], sigmadown[zero_point:]) | |||
# plt.axvline(LyALPHA*(1+sightline.z_qso), linestyle='--') | |||
|
|||
def clip(sightline, unit_default=100, slope=2e-3, plot=False): | |||
def clip(sightline, unit_default=100, slope=2e-3, ratio=0.5, plot=False): |
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.
Also, I don't think it's necessary to add line_fit
as a inner function
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.
I think it will be better to copy those codes e.g., DESIMOCK
from dla_cnn
to the data
folder. dlc_cnn
is another repo to find damped Lya systems in DESI, and it's wired to have it in our folder.
Move some assisting function outside and write them docs.
delete the parameter "plot" and the redundant function "line_fit"
pack them into a json file
From np.log to np.log10
Make it more flexible.
Bug: ignore the last element of the original array
Including dealing with overlap areas, sigmacliping and rebinning to the same restframe
Also convert the catalog.ipynb to .py