-
Notifications
You must be signed in to change notification settings - Fork 35
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
Emsystem #416
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.
Need docs and more tests.
Returns | ||
------- | ||
""" | ||
if method == 'PG16': |
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.
Can you add a http link to the paper here?
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.
This has been added
linetools/isgm/emsystem.py
Outdated
|
||
Parameters | ||
---------- | ||
alis_file |
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.
add
def __init__(self, radec, zem, vlim=None, em_type=None, name=None): | ||
|
||
self.zem = zem | ||
if vlim is None: |
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.
We need to use the zLimits Class here.
I can help set that up. Remind me.
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.
This is now in Issue #419
# | ||
return test | ||
|
||
def chk_emline(self, component): |
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.
We don't use components with EmLine (at least not now).
Remove components and/or this method.
Same goes for anywhere else you see components.
linetools/isgm/emsystem.py
Outdated
self._ionN = ltiu.iontable_from_components(self._components, **kwargs) | ||
|
||
def fill_trans(self, **kwargs): | ||
""" Fills the ionN Table from the list of components |
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.
list of emlines
linetools/isgm/emsystem.py
Outdated
else: | ||
return [self._emlines[ii] for ii in mt] | ||
|
||
def get_component(self, inp): |
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.
remove this method
linetools/isgm/emsystem.py
Outdated
return None | ||
|
||
def measure_restew(self, spec=None, **kwargs): | ||
""" Measure rest-frame EWs for lines in the AbsSystem |
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.
EmSystem
vlim = self.vlim | ||
ltap.stack_plot(self.list_of_abslines(), vlim=vlim, **kwargs) | ||
|
||
def to_dict(self): |
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.
Does this work?
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.
Just checked that this works! There is also a test for it now.
data_dir = os.path.join(os.path.dirname(__file__), 'files') | ||
return os.path.join(data_dir, filename) | ||
|
||
|
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.
Add some other, simpler tests for instantiating the object.
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've added a test for creating an EmSystem object
linetools/tests/test_io.py
Outdated
|
||
def test_emline_from_alis(): | ||
lio.emlines_from_alis_output(data_path('spec1d_J0018p2345_KASTb_coadd.mod.out')) | ||
|
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.
Add some checks that this actually worked.
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.
Done
removed some methods not used for EmSystems
Hey @tiffanyhsyu -- One test is still failing:
That is because the file is not in the repo. And you may need to edit one |
The test, by the way, is tests/test_io.py |
@profxj I've added a 'files' folder under 'test' and uploaded the ALIS .mod.out file there -- is that ok, as far as the organization of the files? |
merging! |
No description provided.