Skip to content

Make creating new simple models more user-friendly #980

Description

@eteq

Right now creating a model in models can be a bit complicated, as it requires overriding a few different methods. Many common models can be expressed quite easily as just a python function (that accepts arrays and parameters). So I suggest creating a metaclass or possibly a function decorator that can be used to build a new model class from just a single function. (The sort of thing I have in mind is something like http://pythonhosted.org/PyModelFit/over.html#creating-a-custom-model )

Additionally, the documentation on creating a new model is probably a bit terse for users (although maybe those more in the developer camp). So making a few more extended examples might be helpful so that users can make whatever kinds of complex models they might want.

(This refers to the models subpackage that will be in astropy when #493 is merged. The intent is to merge that without significant design changes, and address proposed updates through additional issues/PRs like this one)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions