Example #1
0
 def getMeanDarkFrame(self):
     if type(self.darksPath) == str and self.darksPath == "":
         return np.zeros_like(pyfits.getdata(self.imagesPaths[0]))
     else:
         # Else it will be a list of strings
         return systematics.meanDarkFrame(self.darksPath)
Example #2
0
import dataBank
import systematics
import IO
import pyfits
from matplotlib import pyplot as plt

plt.ion()  ## Turn on interactive plots

data = dataBank.dataBank(
)  #imagesPath,darksPath,flatPath,regsPath,ingress,egress)  ## initalize databank for data storage
allStars = data.getDict()  ## Store initialized dictionary
outputPath = data.outputPath
N_exposures = len(data.getPaths())

## Prepare systematic corrections: dark frame, flat field
meanDarkFrame = systematics.meanDarkFrame(data.darksPath)
masterFlat = data.masterFlat

## Tell oscaar what figure settings to use
plottingThings, statusBarFig, statusBarAx = IO.plottingSettings(
    data.trackPlots, data.photPlots)

## Main loop: iterate through each exposures
for expNumber in range(0, N_exposures):

    if statusBarAx != None and expNumber % 15 == 0:
        '''Prepare some plotting settings here'''
        plt.cla()
        statusBarAx.set_title('oscaar2.0 is running...')
        statusBarAx.set_xlim([0, 100])
        statusBarAx.set_xlabel('Percent Complete (%)')
Example #3
0
 def getMeanDarkFrame(self):
     if type(self.darksPath) == str and self.darksPath == "":
         return np.zeros_like(pyfits.getdata(self.imagesPaths[0]))
     else:
         # Else it will be a list of strings
         return systematics.meanDarkFrame(self.darksPath)
import systematics
import IO
import pyfits

# Turn on interactive plots
plt.ion()

# initalize databank for data storage
data = dataBank.dataBank()
# Store initialized dictionary
allStars = data.getDict()
outputPath = data.outputPath
N_exposures = len(data.getPaths())

# Prepare systematic corrections: dark frame, flat field
meanDarkFrame = systematics.meanDarkFrame(data.darksPath)
masterFlat = data.masterFlat

# Tell oscaar what figure settings to use
plottingThings, statusBarFig, statusBarAx = IO.plottingSettings(data.trackPlots, data.photPlots)

# Main loop: iterate through each exposures
for expNumber in xrange(N_exposures):
    if statusBarAx is not None and expNumber % 15 == 0:
        # Prepare some plotting settings here
        plt.cla()
        statusBarAx.set_title("oscaar2.0 is running...")
        statusBarAx.set_xlim([0, 100])
        statusBarAx.set_xlabel("Percent Complete (%)")
        statusBarAx.get_yaxis().set_ticks([])
        statusBarAx.barh([0], [100.0 * expNumber / len(data.getPaths())], [1], color="k")