wcxve / elisa

Efficient library for spectral analysis in high-energy astrophysics.
https://astro-elisa.readthedocs.io
GNU General Public License v3.0
10 stars 3 forks source link

feat: support default value assignment at model construction #57

Closed wcxve closed 5 months ago

wcxve commented 5 months ago

This feature allows for seamless default value assignment during the model construction process.

from elisa.models import PowerLaw

model = PowerLaw(alpha=[1.5])
print(model['PowerLaw']['alpha'].default)  # 1.5
print(model.PowerLaw.alpha.default)  # 1.5