Loading tests/test_prescan_overscan_func.py +25 −22 Original line number Original line Diff line number Diff line import unittest import unittest import sys,os,math import sys import os import math from itertools import islice from itertools import islice import numpy as np import numpy as np import galsim import galsim Loading @@ -8,7 +10,7 @@ import yaml from observation_sim.instruments import Chip, Filter, FilterParam, FocalPlane from observation_sim.instruments import Chip, Filter, FilterParam, FocalPlane ### test FUNCTION --- START ### # test FUNCTION --- START # def AddPreScan(GSImage, pre1=27, pre2=4, over1=71, over2=80, nsecy=2, nsecx=8): def AddPreScan(GSImage, pre1=27, pre2=4, over1=71, over2=80, nsecy=2, nsecx=8): img = GSImage.array img = GSImage.array ny, nx = img.shape ny, nx = img.shape Loading Loading @@ -48,7 +50,7 @@ def AddPreScan(GSImage, pre1=27, pre2=4, over1=71, over2=80, nsecy = 2, nsecx=8) newimg.wcs = GSImage.wcs newimg.wcs = GSImage.wcs return newimg return newimg ### test FUNCTION --- END ### # test FUNCTION --- END # def defineCCD(iccd, config_file): def defineCCD(iccd, config_file): Loading @@ -65,6 +67,7 @@ def defineCCD(iccd, config_file): chip.img.wcs = focal_plane.getTanWCS(192.8595, 27.1283, -113.4333*galsim.degrees, chip.pix_scale) chip.img.wcs = focal_plane.getTanWCS(192.8595, 27.1283, -113.4333*galsim.degrees, chip.pix_scale) return chip return chip def defineFilt(chip): def defineFilt(chip): filter_param = FilterParam() filter_param = FilterParam() filter_id, filter_type = chip.getChipFilter() filter_id, filter_type = chip.getChipFilter() Loading Loading
tests/test_prescan_overscan_func.py +25 −22 Original line number Original line Diff line number Diff line import unittest import unittest import sys,os,math import sys import os import math from itertools import islice from itertools import islice import numpy as np import numpy as np import galsim import galsim Loading @@ -8,7 +10,7 @@ import yaml from observation_sim.instruments import Chip, Filter, FilterParam, FocalPlane from observation_sim.instruments import Chip, Filter, FilterParam, FocalPlane ### test FUNCTION --- START ### # test FUNCTION --- START # def AddPreScan(GSImage, pre1=27, pre2=4, over1=71, over2=80, nsecy=2, nsecx=8): def AddPreScan(GSImage, pre1=27, pre2=4, over1=71, over2=80, nsecy=2, nsecx=8): img = GSImage.array img = GSImage.array ny, nx = img.shape ny, nx = img.shape Loading Loading @@ -48,7 +50,7 @@ def AddPreScan(GSImage, pre1=27, pre2=4, over1=71, over2=80, nsecy = 2, nsecx=8) newimg.wcs = GSImage.wcs newimg.wcs = GSImage.wcs return newimg return newimg ### test FUNCTION --- END ### # test FUNCTION --- END # def defineCCD(iccd, config_file): def defineCCD(iccd, config_file): Loading @@ -65,6 +67,7 @@ def defineCCD(iccd, config_file): chip.img.wcs = focal_plane.getTanWCS(192.8595, 27.1283, -113.4333*galsim.degrees, chip.pix_scale) chip.img.wcs = focal_plane.getTanWCS(192.8595, 27.1283, -113.4333*galsim.degrees, chip.pix_scale) return chip return chip def defineFilt(chip): def defineFilt(chip): filter_param = FilterParam() filter_param = FilterParam() filter_id, filter_type = chip.getChipFilter() filter_id, filter_type = chip.getChipFilter() Loading