Skip to content

Latest commit

 

History

History
34 lines (20 loc) · 606 Bytes

explore-solutions.md

File metadata and controls

34 lines (20 loc) · 606 Bytes

Exercise solutions: Exploring The Data

Exercise 1

IPython solution:

hdulist = pyfits.open('[SOURCE]_filtered_gti.fits')
events=hdulist[1].data

hist(log10(events['ENERGY']),100)
yscale('log')
xlabel('log10(Energy/MeV)')

Note that we plot the histogram with both axes in log-scale in this example.

Exercise 2

hist(events['TIME'],100)
xlabel('Time (s)')