obscode / snpy Goto Github PK
View Code? Open in Web Editor NEWSuperNovae in object-oriented Python (SNooPy)
License: Other
SuperNovae in object-oriented Python (SNooPy)
License: Other
I'm a final year physics undergrad modelling photometric data on sn2022vqz. When attempting to fit or call the template class with method="gp", I get error messages saying that Mean(const) is not a valid attribute of gp object. Browsing the pymc codes on GitHub, there seems to be Mean and Covariance objects, although the keyword arguments the Covariance constructor may take do not match those input in the fit1dcurve.py of SnooPy. Not finding what the first gp.matern.euclidean in PyMC past documentations on their website, I couldn't replace it on my local machine.
Hi, I’m a grad student attempting to use snpy to fit some SNe Ia data. Specifically I’m attempting to use the fitMCMC
method to enforce priors. I have two corrections which I believe should be made:
fitMCMC
(https://users.obs.carnegiescience.edu/cburns/SNooPyDocs/html/fitting_MCMC.html), the first fit is run usings.fit(Rv=2.0)
This correctly fixes the Rv
parameter. However, the MCMC fit is run using
s.fitMCMC(bands=['u','B','V','g','r','i','Y','J','H'], R_V="N,2.3,0.9")
R_V
is not a parameter, Rv
is. I believe passing this extra argument does nothing (e.g. if I pass foobar=’N,2.3,0.9’
then the fit will run without errors, but obviously that’s not a parameter).
I believe that R_V
should be changed to Rv
in the MCMCfit documentation.
EBVhost
:emcee: Exception while calling your likelihood function:
params: [3.25815455e+01 1.55605255e+00 5.81841998e+04]
args: ({'varlist': ['DM', 'dm15', 'EBVhost', 'Tmax'], 'fitflux': True, 'free': ['DM', 'dm15', 'Tmax'], 'DM': {'fixed': False, 'index': 0, 'prior_type': 'model'}, 'dm15': {'fixed': False, 'index': 1, 'prior_type': 'model'}, 'EBVhost': {'value': 'U,0,1', 'fixed': True}, . . .
. . .
"/Users/jamisonfrost/miniconda3/envs/earlysne/lib/python3.7/site-packages/snpy/model.py", line 473, in __call__
temp = temp + self.Robs[band]*self.EBVhost + R*self.parent.EBVgal
TypeError: can't multiply sequence by non-int of type 'numpy.float64'
The parameter is getting fixed as a string, instead of translated into the desired prior. In order for the built-in priors (uniform, exponential, and normal) to be instantiated, I believe this line should be changed:
Line 65 in f8c6ca8
Currently it’s checking for an arg with type bytes
, and I think this should be changed to str
. Passing the argument as a byte string doesn’t work, I get ValueError: I don't understand the prior code b'U,0,1'
(since it checks if st[0] in [‘U’, ‘G’, ‘E’]
, and b’U,0,1’[0]
is apparently 85
). I’ve tested it and making the change to str
allows priors to be enforced as expected.
For completeness, I’m running this on python 3.7.9, snpy version 2.5.3.
I have been using SNooPy to plot light curves in 3 bands and have been plotting them on a single plot with each band offset to allow for better viewing. A feature I think would be really nice would be to be able to plot residuals under this main plot to show how well the model curves fit to the data. Perhaps there could also be the option to specify which bands you'd want to plot the residuals for. This would be a really useful feature.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.