Skip to main content

Deep Learning for Automated Spectral Classification of Supernovae

Project description

# DASH
Supernovae classifying and redshifting software: development stage


## 1. How to install:

1.1 pip install astrodash

or download from github (https://github.com/daniel-muthukrishna/DASH)

## 2. Get started with the Python Library interface:
2.1 Use the following example code:
import dash
classification = dash.Classify([filenames], [knownRedshifts])
print(classification.list_best_matches(n=1)) # Shows top 'n' matches for each spectrum

2.2 To open the gui from a script use:
import dash
dash.run_gui()


## 3. Get started with GUI
2.1 Run gui_main.py

2.2 Once open, type in a known redshift

2.3 Browse for any single spectrum FITS, ASCII, dat, or two-column text file.

2.4 Click any of the best matches to view the continuum-subtracted binned spectra.

2.5 If the input spectrum is too noisy, increase the smoothing level, and click 'Re-fit with priors'


## 4. Dependencies:
Using pip will automatically install numpy, scipy, specutils, pyqtgraph, and tensorflow.

PyQt4

PyQt4 is only needed if you would like to use a graphical interface. It is not available on pip.
It can be installed with anaconda:
"conda install pyqt=4"

## 5. Platforms
5.1 Mac/Unix
DASH is available on both Python2 and Python3 distributions. It can easily be installed with
pip install astrodash

5.2 Windows
Currently one of the primary dependencies, Tensorflow, is only available on Python 3 for Windows.
So DASH is available on Python3 distributions. It can be installed with:
pip install astrodash
If this fails, try first installing specutils with the following:
conda install -c astropy specutils


## 6. Example Usage
6.1 Example from OzDES Run028:
This example automatically classifies 11 spectra. The last line plots the first spectrum on the GUI.
```
import dash

filenames = ['DES16C3elb_C3_combined_161227_v10_b00.dat', 'DES16X3dvb_X3_combined_161225_v10_b00.dat',
'DES16C2ege_C2_combined_161225_v10_b00.dat', 'DES16X3eww_X3_combined_161225_v10_b00.dat',
'DES16X3enk_X3_combined_161225_v10_b00.dat', 'DES16S1ffb_S1_combined_161226_v10_b00.dat',
'DES16C1fgm_C1_combined_161226_v10_b00.dat', 'DES16X2dzz_X2_combined_161226_v10_b00.dat',
'DES16X1few_X1_combined_161227_v10_b00.dat', 'DES16X1chc_X1_combined_161227_v10_b00.dat',
'DES16S2ffk_S2_combined_161227_v10_b00.dat']

knownRedshifts = [0.429, 0.329, 0.348, 0.445, 0.331, 0.164, 0.361, 0.325, 0.311, 0.043, 0.373]

classification = dash.Classify(filenames, knownRedshifts)
print(classification.list_best_matches(n=3))
classification.plot_with_gui(indexToPlot=0)
```

## 7. API Usage
Notes:
Current version requires an input redshift (inaccurate results if redshift is unknown)





Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

astrodash-0.2.31.tar.gz (30.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

astrodash-0.2.31-py2.py3-none-any.whl (35.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file astrodash-0.2.31.tar.gz.

File metadata

  • Download URL: astrodash-0.2.31.tar.gz
  • Upload date:
  • Size: 30.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for astrodash-0.2.31.tar.gz
Algorithm Hash digest
SHA256 efb3491552388456ead059110da04792365bd3f6ce90bc99aec05ea1db580567
MD5 784cb007c81f899c7e3af9e126255dc7
BLAKE2b-256 ef834a0020a44aad5facb5e521effb28b09a4fd9df2227150a3332a818193e05

See more details on using hashes here.

File details

Details for the file astrodash-0.2.31-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for astrodash-0.2.31-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 f963e0e461c6f6874100c45dd35cb82df677b440086e1ef3e3a773dbec7b50f0
MD5 de0b04d613093a2360f1950ba51e39c1
BLAKE2b-256 51469d687006f61d313ef4d5fd074d5e6d6f4cabf31baf44b9b6621b9a90687d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page