Site

Public Code

Site.PublicCode History

Show minor edits - Show changes to output

June 14, 2013, at 10:02 AM EST by 10.163.234.95 -
Changed lines 1-12 from:
!!IDL code


Dfanning

Cyote

!!Other useful code and links

Dropbox

Mass Accretion History code
to:
!!Python extracts

!!!Create an array, such that the histogram will have gaussian properties.
import numpy as np
import mixture

arr = np.concatenate([np.random.normal(0, 1, [1000]),
np.random.normal(6, 2, [2000])])

!!!Save array to file
f = open('output.txt', 'w')
f.writelines(["%s\n" % item for item in list])

!!!Open a fits file
import pyfits
d = pyfits.open('File.fits')
data = d[1].data.field(0)

!!!Create empty array
Size=100
arr=[0.0]*Size

!!!Create IDL indgen() equiv
arr=range(Start,stop)

!!! histograms
import numpy as np
h = np.bincount(InputArr,minlength=MaxSizeHist)
Added lines 1-15:
!!IDL code


Dfanning

Cyote

!!Other useful code and links

Dropbox

Mass Accretion History code

Options: