Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csst-sims
csst_cpic_sim
Commits
540738d7
Commit
540738d7
authored
May 15, 2024
by
GZhao
Browse files
fix pysynphot import warning
parent
75154623
Pipeline
#4582
passed with stage
in 0 seconds
Changes
5
Pipelines
2
Expand all
Show whitespace changes
Inline
Side-by-side
csst_cpic_sim/__init__.py
View file @
540738d7
#
from .main import quick_run
,
observation
_simulation
from
.main
import
quick_run
_v2
,
vis_
observation
from
.optics
import
focal_mask
from
.target
import
star_photlam
,
planet_contrast
,
extract_target_x_y
,
spectrum_generator
from
.camera
import
CosmicRayFrameMaker
,
sky_frame_maker
...
...
@@ -12,4 +12,7 @@ __all__ = [
"extract_target_x_y"
,
"spectrum_generator"
,
"focal_mask"
,
"quick_run_v2"
,
"vis_observation"
,
"__version__"
]
\ No newline at end of file
csst_cpic_sim/config.py
View file @
540738d7
...
...
@@ -126,7 +126,8 @@ with open(cpism_refdata + '/cpism_config.yaml', 'r') as f:
replace_cpism_refdata
(
new_config
,
None
)
config
.
update
(
new_config
)
os
.
environ
[
'PYSYN_CDBS'
]
=
config
[
'pysyn_refdata'
]
if
os
.
environ
.
get
(
'PYSYN_CDBS'
)
is
None
:
os
.
environ
[
'PYSYN_CDBS'
]
=
config
[
'pysyn_refdata'
]
__version__
=
'2.0.0'
# we need to ignore the warning from pysynphot, because we only use the star models.
...
...
csst_cpic_sim/target.py
View file @
540738d7
...
...
@@ -4,12 +4,12 @@ import numpy as np
from
scipy
import
constants
from
astropy.io
import
fits
from
astropy.coordinates
import
SkyCoord
from
pysynphot.renorm
import
StdRenorm
from
.config
import
config
from
.config
import
S
# pysynphot
from
.config
import
config
from
.optics
import
filter_throughput
from
.io
import
log
from
pysynphot.renorm
import
StdRenorm
PLANK_H
=
constants
.
h
# ~6.62607015e-34
...
...
@@ -256,7 +256,7 @@ def star_photlam(
return
star_sp
def
standard_spectrum
(
magnitude
:
float
)
->
S
.
spectrum
.
Spectrum
:
magnitude
:
float
)
->
S
.
Array
Spectrum
:
"""Standard spectrum of magnitude system.
For example, the standard_spectrum of vega megnitude is vega spectrum.
The standard spectrum of ab magnitude is a flat spectrum.
...
...
@@ -308,7 +308,7 @@ def bcc_spectrum(
def
hybrid_albedo_spectrum
(
coe_b
:
float
,
coe_r
:
float
)
->
S
.
spectrum
.
Array
Bandpass
:
coe_r
:
float
)
->
S
.
spectrum
.
Array
SpectralElement
:
"""Albedo spectrum of planet using hybrid-jupiter-neptune model (Lacy et al. 2018)
jupiter and neptune spectrum is from Karkoschka’s 1994
...
...
docs/notebooks/0_15(0.4_0.6)_20240515113846.fits
0 → 100644
View file @
540738d7
This diff is collapsed.
Click to expand it.
docs/notebooks/0_main_example.ipynb
View file @
540738d7
This source diff could not be displayed because it is too large. You can
view the blob
instead.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment