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

Finish most of the preprocess #2

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open

Conversation

AnningGao
Copy link
Collaborator

Including dealing with overlap areas, sigmacliping and rebinning to the same restframe
Also convert the catalog.ipynb to .py

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.
Copy link
Owner

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 and get_between outside the overlap function
  • documents are required for get_split_point and get_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):
Copy link
Owner

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

Copy link
Owner

@ZechangSun ZechangSun left a 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.

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

Successfully merging this pull request may close these issues.

2 participants