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

add support for citations attribute #364

Merged

Conversation

sahiljhawar
Copy link
Member

Solves #362
Uses a Mixin base class with citation attribute to be inherited by other lightcurve classes.

Example usage:

kn = SVDLightCurveModel(model="Bu2019lm",sample_times=[0,0.5],svd_path="path/to/svd",local_only=True,filters=["2massh"])
grb  = GRBLightCurveModel(sample_times=[0,0.5])

combined = GenericCombineLightCurveModel(models=[kn,grb],sample_times=[0,0.5])

combined.citation
>>> [{'Bu2019lm': ['https://arxiv.org/abs/2002.11355',
    'https://arxiv.org/abs/1906.04205']},
    {'TrPi2018': ['https://arxiv.org/abs/1909.11691']}]

kn.citation
>>>{'Bu2019lm': ['https://arxiv.org/abs/2002.11355',
   'https://arxiv.org/abs/1906.04205']}

grb.citation
>>>{'TrPi2018': ['https://arxiv.org/abs/1909.11691']}

Few citations are missing

Copy link
Member

@mcoughlin mcoughlin 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 this looks good, let's just use a better name than Mixin.

nmma/em/model.py Outdated Show resolved Hide resolved
Copy link
Member

@mcoughlin mcoughlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mcoughlin mcoughlin merged commit 5279f4d into nuclear-multimessenger-astronomy:main Jun 23, 2024
4 checks passed
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