diff --git a/ObservationSim/Instrument/Chip/__pycache__/Chip.cpython-38.pyc b/ObservationSim/Instrument/Chip/__pycache__/Chip.cpython-38.pyc deleted file mode 100644 index 024f6e55eb27718a99d6153eca7714a75a1289f2..0000000000000000000000000000000000000000 Binary files a/ObservationSim/Instrument/Chip/__pycache__/Chip.cpython-38.pyc and /dev/null differ diff --git a/ObservationSim/Instrument/Chip/__pycache__/ChipUtils.cpython-38.pyc b/ObservationSim/Instrument/Chip/__pycache__/ChipUtils.cpython-38.pyc deleted file mode 100644 index 54ec3424f546352d2327c7ecf9bb57982c696fe4..0000000000000000000000000000000000000000 Binary files a/ObservationSim/Instrument/Chip/__pycache__/ChipUtils.cpython-38.pyc and /dev/null differ diff --git a/ObservationSim/Instrument/Chip/__pycache__/Effects.cpython-38.pyc b/ObservationSim/Instrument/Chip/__pycache__/Effects.cpython-38.pyc deleted file mode 100644 index 661c5b51b54a66f76db46196c1aea5917dbe4314..0000000000000000000000000000000000000000 Binary files a/ObservationSim/Instrument/Chip/__pycache__/Effects.cpython-38.pyc and /dev/null differ diff --git a/ObservationSim/Instrument/Chip/__pycache__/__init__.cpython-38.pyc b/ObservationSim/Instrument/Chip/__pycache__/__init__.cpython-38.pyc deleted file mode 100644 index 88fdd9681bd870a3648dd5635ee99fb7c01da9d6..0000000000000000000000000000000000000000 Binary files a/ObservationSim/Instrument/Chip/__pycache__/__init__.cpython-38.pyc and /dev/null differ diff --git a/ObservationSim/Instrument/Chip/libBF/__pycache__/__init__.cpython-38.pyc b/ObservationSim/Instrument/Chip/libBF/__pycache__/__init__.cpython-38.pyc deleted file mode 100644 index d5b238d75bc180ae1222ae9e01f4f25e5c1dfd2e..0000000000000000000000000000000000000000 Binary files a/ObservationSim/Instrument/Chip/libBF/__pycache__/__init__.cpython-38.pyc and /dev/null differ diff --git a/ObservationSim/Instrument/Chip/libCTI/__pycache__/CTI_modeling.cpython-38.pyc b/ObservationSim/Instrument/Chip/libCTI/__pycache__/CTI_modeling.cpython-38.pyc deleted file mode 100644 index 6e94646d36b6bf60de4c8f04a75b5049a6d9c67d..0000000000000000000000000000000000000000 Binary files a/ObservationSim/Instrument/Chip/libCTI/__pycache__/CTI_modeling.cpython-38.pyc and /dev/null differ diff --git a/ObservationSim/Instrument/Chip/libCTI/__pycache__/__init__.cpython-38.pyc b/ObservationSim/Instrument/Chip/libCTI/__pycache__/__init__.cpython-38.pyc deleted file mode 100644 index 875c6baa7e8da652f4e6bb0ea811ec50c30a3c3f..0000000000000000000000000000000000000000 Binary files a/ObservationSim/Instrument/Chip/libCTI/__pycache__/__init__.cpython-38.pyc and /dev/null differ diff --git a/ObservationSim/MockObject/data/led/__pycache__/__init__.cpython-38.pyc b/ObservationSim/MockObject/data/led/__pycache__/__init__.cpython-38.pyc deleted file mode 100644 index 7ef0a5f3a295a16e765166aed8e9175fb7ff3158..0000000000000000000000000000000000000000 Binary files a/ObservationSim/MockObject/data/led/__pycache__/__init__.cpython-38.pyc and /dev/null differ diff --git a/install.sh b/install.sh index 8f3a259b2288a00742f48d97c536943010f082fe..b753ad99ae39763a9d88dcb2c0029ba5f01194b3 100644 --- a/install.sh +++ b/install.sh @@ -5,4 +5,5 @@ conda install numpy==1.26.4 conda install cython==3.0.6 conda install sep==1.2.1 conda install mpi4py==3.1.6 -pip install -e . \ No newline at end of file +python3 setup.py install --user +pip install -e . diff --git a/requirements.txt b/requirements.txt index 512d9def88acc2a95775fa8a7aed0c175ef25771..12b61a25ad92dc287b5f8d10e1a44370689e6895 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,4 +10,5 @@ h5py==3.11.0 Cython==3.0.6 numba==0.59.1 psutil==5.9.8 -toml==0.10.2 \ No newline at end of file +toml==0.10.2 +lmfit==1.2.2 \ No newline at end of file diff --git a/setup.py b/setup.py index f2df3aa8a9ecaa416a0c8a412bac544db80848eb..12b27729ca025e5679de24217289b7b74685d628 100644 --- a/setup.py +++ b/setup.py @@ -98,7 +98,7 @@ setup(name='CSSTSim', 'ObservationSim.Instrument.data.sls_conf': ['*.conf', '*.fits'], 'ObservationSim.Instrument.data.flatCube': ['*.fits'], 'Catalog.data': ['*.fits','*.so'], - 'ObservationSim.Config.Header':['*.header','*.lst'], + 'ObservationSim.Config.Header':['*.fits','*.lst'], 'ObservationSim.Straylight.data': ['*.dat'], 'ObservationSim.Straylight.data.sky': ['*.dat'], 'ObservationSim.Straylight.lib': ['*'], diff --git a/tests/det_effect_unit_test.py b/tests/det_effect_unit_test.py index 51b620a0e32c4705fa7197e96c7040f8020c3260..92cd4819c06b581361d7626aa43fe9706b5518d8 100644 --- a/tests/det_effect_unit_test.py +++ b/tests/det_effect_unit_test.py @@ -138,15 +138,15 @@ class DetTest(unittest.TestCase): newimg.write(os.path.join(self.outDataFn,'test_badlines.fits')) del newimg,img - def test_cte(self): - img = galsim.Image(200,200,init_value=1000) - img.array[50,80] = 1e4 - img.array[150,150] = 3e4 - newimgcol = Effects.CTE_Effect(copy.deepcopy(img),direction='column') - newimgrow = Effects.CTE_Effect(copy.deepcopy(img),direction='row') - newimgcol.write(os.path.join(self.outDataFn,'test_ctecol.fits')) - newimgrow.write(os.path.join(self.outDataFn,'test_cterow.fits')) - del img,newimgcol,newimgrow + # def test_cte(self): + # img = galsim.Image(200,200,init_value=1000) + # img.array[50,80] = 1e4 + # img.array[150,150] = 3e4 + # newimgcol = Effects.CTE_Effect(copy.deepcopy(img),direction='column') + # newimgrow = Effects.CTE_Effect(copy.deepcopy(img),direction='row') + # newimgcol.write(os.path.join(self.outDataFn,'test_ctecol.fits')) + # newimgrow.write(os.path.join(self.outDataFn,'test_cterow.fits')) + # del img,newimgcol,newimgrow def test_readnoise(self): img = galsim.Image(200,200,init_value=1000) diff --git a/tests/test_SpecDisperse.py b/tests/test_SpecDisperse.py index 34b388bc2a22c36df5bae79103455240aa9a4c7d..0931b5212756c0f14c5c7ca8e3610ba14359d74e 100644 --- a/tests/test_SpecDisperse.py +++ b/tests/test_SpecDisperse.py @@ -231,16 +231,16 @@ class TestSpecDisperse(unittest.TestCase): ids1 = wave_pix[ids] > 6500 print('Spec disperse flux test') self.assertTrue(np.mean((wave_flux[ids][ids1] - sed_i(wave_pix[ids][ids1]))/sed_i(wave_pix[ids][ids1]))<0.004) - plt.figure() - plt.plot(wave_pix, wave_flux) - plt.plot(sed['WAVELENGTH'], sed['FLUX']) - plt.xlim(6200, 10000) - plt.ylim(1, 3) - plt.yscale('log') - plt.xlabel('$\lambda$') - plt.ylabel('$F\lambda$') - plt.legend(['extracted', 'input']) - plt.show() + # plt.figure() + # plt.plot(wave_pix, wave_flux) + # plt.plot(sed['WAVELENGTH'], sed['FLUX']) + # plt.xlim(6200, 10000) + # plt.ylim(1, 3) + # plt.yscale('log') + # plt.xlabel('$\lambda$') + # plt.ylabel('$F\lambda$') + # plt.legend(['extracted', 'input']) + # plt.show() def test_Specdistperse2(self): @@ -303,16 +303,16 @@ class TestSpecDisperse(unittest.TestCase): self.assertTrue(fwhmx/deltLamda_pix*pix_scale - psf_fwhm < np.abs(0.02)) # print('error is ',np.mean((wave_flux[ids][ids1] - sed_i(wave_pix[ids][ids1]))/sed_i(wave_pix[ids][ids1]))) # self.assertTrue(np.mean((wave_flux[ids][ids1] - sed_i(wave_pix[ids][ids1]))/sed_i(wave_pix[ids][ids1]))<0.004) - plt.figure() - plt.plot(wave_pix, wave_flux) - plt.plot(sed['WAVELENGTH'], sed['FLUX']) - plt.xlim(6200, 10000) - plt.ylim(1, 75) - plt.yscale('log') - plt.xlabel('$\lambda$') - plt.ylabel('$F\lambda$') - plt.legend(['extracted', 'input']) - plt.show() + # plt.figure() + # plt.plot(wave_pix, wave_flux) + # plt.plot(sed['WAVELENGTH'], sed['FLUX']) + # plt.xlim(6200, 10000) + # plt.ylim(1, 75) + # plt.yscale('log') + # plt.xlabel('$\lambda$') + # plt.ylabel('$F\lambda$') + # plt.legend(['extracted', 'input']) + # plt.show() def test_Specdistperse3(self):