Skip to content

Calling mosfit models as functions. #192

@nikhil-sarin

Description

@nikhil-sarin

Hi. New user here.

Is there a way to evaluate a mosfit model as a function? I tried digging into the code but I can't figure out how to isolate the various modules/classes.

To elaborate, say if I want to evaluate the SLSN model. I can just do something like

import mosfit
model = mosfit.model('slsn')
model.evaluate(time, bands, **params)

Here time is an array of observation times, bands is an array of bands corresponding to the observation times and params is a dictionary of parameters corresponding to the SLSN model. The documentation suggests a workflow that is quite close but I don't actually want to load an observation and the associated array of data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions