コード例 #1
0
ファイル: observationSummary.py プロジェクト: rovor/RedROVOR
 def parseHeader(self, header):
     '''parse a FITS header, and if the image is an
     object frame add the information to the summary
     return true if an object, false otherwise'''
     if fitsHeader.getFrameType(header) == 'object':
         targetName = fitsHeader.getObjectName(header)
         filterName = fitsHeader.getFilter(header)
         self.addObservation(targetName, filterName)
         return True
     else:
         return False
コード例 #2
0
ファイル: observationSummary.py プロジェクト: rovor/RedROVOR
 def parseHeader(self, header):
     '''parse a FITS header, and if the image is an
     object frame add the information to the summary
     return true if an object, false otherwise'''
     if fitsHeader.getFrameType(header) == 'object':
         targetName = fitsHeader.getObjectName(header)
         filterName = fitsHeader.getFilter(header)
         self.addObservation(targetName, filterName)
         return True
     else:
         return False
コード例 #3
0
ファイル: frameTypes.py プロジェクト: rovor/RedROVOR
def getFrameLists(fileList):
    '''given an iterator of filenames, go through each one, 
	get the the type of the frame and add it to the appropriate list
	return a dictionary containing lists of files for 'zero', 'dark',
	'object', and 'none'. The 'none' category will contain fits files
	that we can't determine the type for and files that we are unable to 
	open'''
    results = {'zero': [], 'dark': [], 'flat': [], 'object': [], 'unknown': []}
    for f in iter(fileList):
        try:
            imType = getFrameType(pyfits.getheader(f))
        except:
            imType = 'unknown'
        if imType is None:
            imType = 'unknown'
        results[imType].append(f)
    return results
コード例 #4
0
ファイル: frameTypes.py プロジェクト: rovor/RedROVOR
def getFrameLists(fileList):
	'''given an iterator of filenames, go through each one, 
	get the the type of the frame and add it to the appropriate list
	return a dictionary containing lists of files for 'zero', 'dark',
	'object', and 'none'. The 'none' category will contain fits files
	that we can't determine the type for and files that we are unable to 
	open'''
	results = {'zero':[],'dark':[],'flat':[],'object':[],'unknown':[]}
	for f in iter(fileList):
		try:
			imType = getFrameType(pyfits.getheader(f))
		except:
			imType = 'unknown'	
		if imType is None:
			imType = 'unknown'
		results[imType].append(f)
	return results