Closed
Description
print model
is supposed to return a summary of the SN model at any point. At present, if a Model is instantiated by
model = sncosmo.Model(source='salt2')
p = {'z':0.5, 'c': 0.1, 'x0': 4.6e-7., 'x1': 1.2}
model.set(**p)
print model
print model
<Model at 0x103888750>
source:
class : SALT2Source
name : None
version : None
phases : [-20, .., 50] days
wavelengths: [2000, .., 9200] Angstroms
parameters:
z = 0.5
t0 = 0.0
x0 = 4.5999999999999999e-07
x1 = 1.2
c = 0.10000000000000001
So, this is printing out the fact that it is a SALT2SOURCE, but does not mention the actual model. This is probably because this does not assign a name to the source.
print model.source.name
None
Does it make sense to try to make the filename a source name by default (unless the user chooses to specify something else), so that one can see how they started the model?
Metadata
Metadata
Assignees
Labels
No labels
Activity
kbarbary commentedon Mar 31, 2015
Looks like the name and version keyword arguments are not being passed
correctly for the built in models.
On Mar 31, 2015 11:09 AM, "rbiswas4" notifications@github.com wrote:
rbiswas4 commentedon Mar 31, 2015
Yes, I think there was an intent at some point that users should be able to assign a name of their choice to a source when creating a SALT2Source. But when using a built-in, this should not be
None
.kbarbary commentedon Mar 31, 2015
It used to be 'salt2' but looks like something changed in the process of
refactoring the built in data.
On Mar 31, 2015 11:33 AM, "rbiswas4" notifications@github.com wrote: