Commit 031ff30e authored by xin's avatar xin
Browse files

init

parents
This diff is collapsed.
from SpecGen.SpecGenerator import SpecGenerator
from SpecGen.Config import Config
import galsim
if __name__ == '__main__':
dataDir = '../data/'
config = Config(dataDir = dataDir)
sedFn = dataDir + 'sed/sed_44575.txt'
psf = galsim.Gaussian(fwhm=0.39)
specG = SpecGenerator(sedFn = sedFn, grating = 'GI', beam = 'A', aper = 2.0, xcenter = 5000,ycenter = 5000, p_size = 0.074, psf = psf, skybg = 0.3, dark = 0.02, readout = 5, t = 150, expNum = 1,config = config)
specTab, specImg, img, fluxRa=specG.generateSpec1dforStar()
python setup.py install
pip install -e .
\ No newline at end of file
'''
Author: xin zhangxinbjfu@gmail.com
Date: 2022-04-29 16:13:01
LastEditors: xin zhangxinbjfu@gmail.com
LastEditTime: 2022-05-19 10:52:31
FilePath: /undefined/Users/zhangxin/Work/SlitlessSim/sls_lit_demo/setup.py
Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
'''
from setuptools import setup, find_packages
from setuptools.extension import Extension
from setuptools.config import read_configuration
from Cython.Build import cythonize
import numpy
extensions = [
Extension("SpecDisperser.disperse_c.interp", ["SpecDisperser/disperse_c/interp.pyx"],
include_dirs = [numpy.get_include()],
libraries=["m"]),
Extension("SpecDisperser.disperse_c.disperse", ["SpecDisperser/disperse_c/disperse.pyx"],
include_dirs = [numpy.get_include()],
libraries=["m"]),
]
version='1.0.1'
setup(
name = "SpecDisperser",
version = version,
description = "Slitless spec disperse",
packages=['SpecDisperser', 'SpecDisperser/disperse_c'],
install_requires=[
'galsim',
'numpy',
'scipy',
'astropy',
],
ext_modules = cythonize(extensions),
)
'''
Author: xin zhangxinbjfu@gmail.com
Date: 2022-05-18 08:37:51
LastEditors: xin zhangxinbjfu@gmail.com
LastEditTime: 2022-05-20 08:43:13
FilePath: /undefined/Users/zhangxin/Work/SlitlessSim/sls_lit_demo/example/sim_demo1.py
Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
'''
from SpecGen.SpecGenerator import SpecGenerator
from SpecGen.Config import Config
import galsim
if __name__ == '__main__':
dataDir = 'data/'
config = Config(dataDir = dataDir)
sedFn = dataDir + 'sed/sed_44575.txt'
psf = galsim.Gaussian(fwhm=0.39)
specG = SpecGenerator(sedFn = sedFn, grating = 'GI', beam = 'A', aper = 2.0, xcenter = 5000,ycenter = 5000, p_size = 0.074, psf = psf, skybg = 0.3, dark = 0.02, readout = 5, t = 150, expNum = 1,config = config)
specTab, specImg, img, fluxRa=specG.generateSpec1dforStar()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment