daniel-muthukrishna / astrodash Goto Github PK
View Code? Open in Web Editor NEWDeep learning for the automated spectral classification of supernovae
Home Page: http://astrodash.readthedocs.io
License: MIT License
Deep learning for the automated spectral classification of supernovae
Home Page: http://astrodash.readthedocs.io
License: MIT License
When I attempt to run dash on some spectra, I get the following error message:
Traceback (most recent call last): File "check_type_with_dash.py", line 1, in <module> import dash File "/Users/uqdpark7/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/dash/__init__.py", line 3, in <module> from classify import Classify File "/Users/uqdpark7/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/dash/classify.py", line 7, in <module> from restore_model import LoadInputSpectra, BestTypesListSingleRedshift ImportError: No module named restore_model
Save the plot, list of best matches (with probabilities) and the redshift.
As requested by Brad Tucker
training three separate models trained with different age bins: 1.) less than -2 days; 2.) more than +2days; 3.) -5 to +10 days. Then, an option to allow the user to select which model to use should act like an age prior.
As requested by Mat Smith.
Hi there. I'm trying to install and followed the README but have run into the following error
Traceback (most recent call last):
File "/usr/local/Caskroom/miniconda/base/envs/astrodash/bin/astrodash", line 8, in <module>
sys.exit(run_gui())
File "/usr/local/Caskroom/miniconda/base/envs/astrodash/lib/python3.8/site-packages/astrodash/__init__.py", line 39, in run_gui
form = MainApp(inputFilename=filepath)
File "/usr/local/Caskroom/miniconda/base/envs/astrodash/lib/python3.8/site-packages/astrodash/gui_main.py", line 24, in __init__
self.templates()
File "/usr/local/Caskroom/miniconda/base/envs/astrodash/lib/python3.8/site-packages/astrodash/gui_main.py", line 100, in templates
pars = get_training_parameters()
File "/usr/local/Caskroom/miniconda/base/envs/astrodash/lib/python3.8/site-packages/astrodash/restore_model.py", line 15, in get_training_parameters
with open(os.path.join(scriptDirectory, data_files, "models/zeroZ/training_params.pickle"), 'rb') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/Caskroom/miniconda/base/envs/astrodash/lib/python3.8/site-packages/astrodash/models_v06/models/zeroZ/training_params.pickle'
Many thanks in advance for your help,
Dillon
Traceback (most recent call last):
File "/home/dustspeck/miniconda3/lib/python3.7/site-packages/pyqtgraph/exporters/Exporter.py", line 77, in fileSaveFinished
self.export(fileName=fileName, **self.fileDialog.opts)
File "/home/dustspeck/miniconda3/lib/python3.7/site-packages/pyqtgraph/exporters/ImageExporter.py", line 70, in export
bg = np.empty((self.params['width'], self.params['height'], 4), dtype=np.ubyte)
When trying to export with the option 'Matplotlib Window' it also crashes.
Error output :
When selecting the 'Entire scene' instead of 'Plot', saving in image format and SVG seems to work fine.
Hi Daniel,
Thanks for developing such a powerful software package. In issue #16 you mention a future feature to add your own SN templates to the library. Is this feature added? If yes, Is it possible to define my own class of transients?
A related question, if I would have the spectrum/SED of the host galaxy of a particular supernova, can this be used instead of the generic galaxy templates?
Cheers,
Steve
Allow control for noise, host galaxy weighting, cropping...
Hi,
I'm installing astrodash in a shared software installation. When running a simple test, I see there is a data file that is downloaded. Is there a suggested way to handle this during the installation process rather than waiting for the need of this file to trigger the download?
python classify.py -h
Downloading data files from https://github.com/daniel-muthukrishna/astrodash/blob/master/astrodash/models_v06.zip?raw=true...
This download contains the Tensorflow models trained using deep learning.
The file to be downloaded is ~200MB. However, this is a one time download, and will only occur
the very first time that this version of DASH is installed.
Include pop-up tooltips that explain various tuning parameters on the interface such as "smoothing".
Asscalar was dropped in 1.23. Temporary fix is:
pip install numpy==1.22.4
pip install git+https://github.com/daniel-muthukrishna/astrodash.git
Tried out this one: https://raw.githubusercontent.com/astrocatalogs/sne-external-spectra/master/CfA_SNIbc/sn1998dt/sn1998dt-19980919.flm
Which is at a redshift of 0.0153. I had installed the latest version into a fresh Python 2.7 environment via python setup.py install
.
My test.py:
import dash
classification = dash.Classify(["/path/to/sn1998dt-19980919.flm"], [0.0153])
print(classification.list_best_matches(n=1))
The error:
Invalid Input File
Traceback (most recent call last):
File "test.py", line 4, in <module>
print(classification.list_best_matches(n=1))
File "/Users/james/miniconda3/envs/py27/lib/python2.7/site-packages/dash/classify.py", line 58, in list_best_matches
bestTypes, softmaxes = self._input_spectra_info()
File "/Users/james/miniconda3/envs/py27/lib/python2.7/site-packages/dash/classify.py", line 48, in _input_spectra_info
inputImage, typeNamesList, nw, nBins = self._get_images(f, z, trainParams)
File "/Users/james/miniconda3/envs/py27/lib/python2.7/site-packages/dash/classify.py", line 36, in _get_images
loadInputSpectra = LoadInputSpectra(filename, redshift, redshift, self.smooth, trainParams)
File "/Users/james/miniconda3/envs/py27/lib/python2.7/site-packages/dash/restore_model.py", line 43, in __init__
self.inputImages, self.inputFilenames, self.inputRedshifts, self.typeNamesList = self.inputSpectra.redshifting()
File "/Users/james/miniconda3/envs/py27/lib/python2.7/site-packages/dash/input_spectra.py", line 38, in redshifting
tempwave, tempflux, tminindex, tmaxindex = readSpectra.input_spectrum(z, self.smooth)
File "/Users/james/miniconda3/envs/py27/lib/python2.7/site-packages/dash/create_arrays.py", line 137, in input_spectrum
wave, flux, minIndex, maxIndex = self.data.two_column_data(z, smooth)
File "/Users/james/miniconda3/envs/py27/lib/python2.7/site-packages/dash/sn_processing.py", line 44, in two_column_data
self.wave, self.flux = self.spectrum
TypeError: 'int' object is not iterable
Create extra dimension of bins to classify host galaxy
It would be great to pass a Nx2 (or Nx3) array into Classify
rather than a filename, for use in other packages where the spectrum might already be loaded into memory.
Add mstars/mdwarfs, quasars, AGN
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.