def correctImage(imgdata):
        """
        Correct an image using the old method:
        - no bias correction
        - dark correction is not time dependent in the normal mode
        """
        rawimgarray = imgdata['image']
        sessionname = imgdata['session']['name']
        darkarray, normarray = apDatabase.getDarkNorm(sessionname, imgdata['camera'])
        correctedimgarray = normarray * (rawimgarray - darkarray)
        return correctedimgarray
Пример #2
0
def correctImage(imgdata, sessionname):
	"""
	Correct an image using the old method:
	- no bias correction
	- dark correction is not time dependent
	"""
	rawimgarray = imgdata['image']
	from appionlib import apDatabase
	darkarray, normarray = apDatabase.getDarkNorm(sessionname, imgdata['camera'])
	correctedimgarray = normarray * (rawimgarray - darkarray)
	return correctedimgarray