Exemplo n.º 1
0
def get_iq_and_zeropoint(image, header_extract):
    # Options: it can be in the image tag, it can be in the file if that's been created.
    fwhm = storage.get_tag(image,
                           'fwhm_22')  # 22 is the standard chip: mid lower
    if fwhm is None:  # not in tag, maybe in the file: does that exist?
        sys.stdout.write('...no fwhm vtag. Instead trying file. ')
        try:
            fwhm = storage.get_fwhm(image, ccd=22)
        except:  # no file yet then either
            fwhm = None
            sys.stdout.write('...fwhm not yet measured. ')

    if fwhm is not None:
        iq = float(fwhm) * 0.1850  # plate scale is 0.1850 arcsec/pixel
        header_extract['iq_ossos'] = iq
    else:
        header_extract[
            'iq_ossos'] = None  # This will need to be updated in the future, then.
    sys.stdout.write('Storing IQ: %s\n' % str(header_extract['iq_ossos']))

    zeropt = storage.get_tag(image, 'zeropoint_22')
    if zeropt is None:
        sys.stdout.write('...no zeropoint vtag. Instead trying file. ')
        try:
            zeropt = storage.get_zeropoint(image, ccd=22)
        except:  # no file yet then either
            zeropt = None
            sys.stdout.write('...zeropoint not yet measured. ')

    header_extract['zeropt'] = zeropt
    sys.stdout.write('Storing zeropoint: %s\n' % str(header_extract['zeropt']))

    return header_extract
Exemplo n.º 2
0
def get_iq_and_zeropoint(image, header_extract):
    # Options: it can be in the image tag, it can be in the file if that's been created.
    fwhm = storage.get_tag(image, 'fwhm_22')  # 22 is the standard chip: mid lower
    if fwhm is None:  # not in tag, maybe in the file: does that exist?
        sys.stdout.write('...no fwhm vtag. Instead trying file. ')
        try:
            fwhm = storage.get_fwhm(image, ccd=22)
        except:  # no file yet then either
            fwhm = None
            sys.stdout.write('...fwhm not yet measured. ')

    if fwhm is not None:
        iq = float(fwhm) * 0.1850  # plate scale is 0.1850 arcsec/pixel
        header_extract['iq_ossos'] = iq
    else:
        header_extract['iq_ossos'] = None  # This will need to be updated in the future, then.
    sys.stdout.write('Storing IQ: %s\n' % str(header_extract['iq_ossos']))

    zeropt = storage.get_tag(image, 'zeropoint_22')
    if zeropt is None:
        sys.stdout.write('...no zeropoint vtag. Instead trying file. ')
        try:
            zeropt = storage.get_zeropoint(image, ccd=22)
        except:  # no file yet then either
            zeropt = None
            sys.stdout.write('...zeropoint not yet measured. ')

    header_extract['zeropt'] = zeropt
    sys.stdout.write('Storing zeropoint: %s\n' % str(header_extract['zeropt']))

    return header_extract
Exemplo n.º 3
0
def get_iq_and_zeropoint(image, header_extract):
	try:  # 22 is the standard chip: mid lower
		fwhm = storage.get_tag(image, 'fwhm_22')
		if fwhm is None:
			fwhm_file = storage.get_uri(image, ccd=22, ext='fwhm')# hfile+'/ccd22/'+image+'p22.fwhm'
			print fwhm_file
			fwhm = float(storage.vospace.open(fwhm_file,view='data').read())
		# now can we work with it?
		if fwhm is not None:
			iq = float(fwhm)*0.1850  # plate scale is 0.1850 arcsec/pixel
			header_extract['iq_ossos'] = iq
		else:
			header_extract['iq_ossos'] = fwhm  # HACKED FOR NOW, WILL BE ADJUSTED LATER

	except Exception, e:
		header_extract['iq_ossos'] = None # HACKED FOR NOW, FIX LATER
Exemplo n.º 4
0
def get_snr(image, header_extract):
    snr = storage.get_tag(image, 'snr_13')
    header_extract['snr'] = snr

    return header_extract
Exemplo n.º 5
0
		if fwhm is None:
			fwhm_file = storage.get_uri(image, ccd=22, ext='fwhm')# hfile+'/ccd22/'+image+'p22.fwhm'
			print fwhm_file
			fwhm = float(storage.vospace.open(fwhm_file,view='data').read())
		# now can we work with it?
		if fwhm is not None:
			iq = float(fwhm)*0.1850  # plate scale is 0.1850 arcsec/pixel
			header_extract['iq_ossos'] = iq
		else:
			header_extract['iq_ossos'] = fwhm  # HACKED FOR NOW, WILL BE ADJUSTED LATER

	except Exception, e:
		header_extract['iq_ossos'] = None # HACKED FOR NOW, FIX LATER

	try:
		zeropt = storage.get_tag(image, 'zeropoint_22')
		if zeropt is None:
			zeropt_file = storage.get_uri(image, ccd=22, ext='zeropoint.used') # hfile+'/ccd22/'+image+'p22.zeropoint.used'  # the standard chip
			zeropt = storage.vospace.open(zeropt_file,view='data').read()
		# now let's try	
		if zeropt is not None:
			header_extract['zeropt'] = float(zeropt)

		else:
			header_extract['zeropt'] = zeropt  # HACKED FOR NOW, WILL BE ADJUSTED LATER

	except Exception, e:
		header_extract['zeropt'] = None  # HACKED: FIX LATER

	return header_extract
Exemplo n.º 6
0
def get_snr(image, header_extract):
    snr = storage.get_tag(image, 'snr_13')
    header_extract['snr'] = snr

    return header_extract