In [ ]:
import numpy as np
from pylab import *
%matplotlib inline
import warnings
warnings.filterwarnings('ignore')
Trying to reconstruct how to run the simulations. There are two python scripts:
LCSgalfitsim.py
LCSrungalfitsimall.py
The second scripts runs the simulations for all the clusters. To run on just one cluster:
LCSgalfitsim.py MKW11
This calls calls the function:
Trying to run through the simulation for MKW11.
Some issues:
coverage images weren't copied to new laptop
changed max Re of model to 10 pixels (consistent with our max size cut of 20 arcsec)
Important Changes as of 1/14/2016 (yes, 2016!)
need to run this from the command line because ds9 is not playing nice with notebook
%run ~/Dropbox/pythonCode/LCSgalfitsim.py MKW11
Once simulation has finished, you can read in the simulation results and make some plots.
In [28]:
%run ~/Dropbox/pythonCode/LCSgalfitsim.py
In [29]:
mkw11=simresults('MKW11')
In [30]:
mkw11.plotsample()
In [31]:
mkw11.plotresultsv2(usesb=1)
In [32]:
mkw11.plotsizeRe()
In [33]:
mkw11.plotsizesb()
In [59]:
%run ~/Dropbox/pythonCode/LCSgalfitsim.py
In [56]:
plotsizesball()
In [55]:
plotsizeReall()
What is up with Hercules???
Need to figure this out or drop it from the sample.
In [60]:
herc.plotresultsv2()
In [62]:
herc.plotsizeRe()
axis([1,20,.2,10])
Out[62]:
going back to square one with Hercules. For some reason, it something is very wrong with the size measurements.
I'm assuming this is a problem with the PRF.
self.psf_image='/Users/rfinn/research/LocalClusters/PRF/'+self.prefix+'/'+self.prefix+'psf_starv2.fits'
In [63]:
from astropy.io import fits
prf=fits.getdata('/Users/rfinn/research/LocalClusters/PRF/Hercules/Herculespsf_starv2.fits')
imshow(prf)
Out[63]:
In [64]:
# here is MKW11
prf=fits.getdata('/Users/rfinn/research/LocalClusters/PRF/MKW11/MKW11psf_starv2.fits')
imshow(prf)
Out[64]:
In [66]:
# the default mips psf
# oversampled by a factor of 4
prf=fits.getdata('/Users/rfinn/research/LocalClusters/GalfitAnalysis/MIPSpsf/mips24_prf_mosaic_2.45_4x.fits')
imshow(prf)
Out[66]:
Trying mips default PRF
In [71]:
%run ~/Dropbox/pythonCode/LCSgalfitsim.py
In [72]:
herc.plotsizeRe()
well that certainly seems better! Going to run for 100 galaxies now to see if fitted size is better.
In [73]:
plotsizeReall()
Does this mean I have to redo galfit on the Hercules galaxies???
In [74]:
plotsizesball()
Redid fits for all Hercules galaxies and the generic mips PRF worked much better. Yay!
In [ ]: