Skip to content

Instantly share code, notes, and snippets.

View DanielAndreasen's full-sized avatar
🦝

Daniel Thaagaard Andreasen DanielAndreasen

🦝
View GitHub Profile
name: ObservationTools
channels:
- !!python/unicode
'defaults'
dependencies:
- !!python/unicode
'openssl=1.0.2k=1'
- !!python/unicode
'pip=9.0.1=py27_1'
- !!python/unicode
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
<form class="form-horizontal" enctype="multipart/form-data" action="/cgi-bin/ewConf.py" method="post">
<label class="control-label col-sm-2">Spectrum:</label>
<input type="file" name="spectrum" class="btn btn-default" placeholder="Enter fits spectrum" required>
<button type="submit" class="btn btn-default">Submit</button>
</form>
@DanielAndreasen
DanielAndreasen / SWEETCat.py
Created May 25, 2015 15:37
SWEETCat in python with PyAstronomy
"""
This small example that shows how to use python to work with SWEET-Cat
https://www.astro.up.pt/resources/sweet-cat/
It use the PyAstronomy package which can be found here
https://github.com/sczesla/PyAstronomy
http://www.hs.uni-hamburg.de/DE/Ins/Per/Czesla/PyA/PyA/index.html
The package can be installed with pip
pip install PyAstronomy
@DanielAndreasen
DanielAndreasen / gist:4f90f4af84a88a6785a6
Created May 20, 2015 09:55
Reading messy harps csv file in python
fields = ['star', 'teff', 'erteff', 'logg', 'erlogg', 'logghip', 'erlogg', 'vt', 'ervt', 'metal', 'ermetal']
df = pd.read_csv('harps_all.dat', usecols=fields, delimiter=r'\s+')
print df.head()
print df.star
print df.ervt
print df['ervt']