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
Bo Zhang
csst
Commits
1faa615c
Commit
1faa615c
authored
Jun 01, 2022
by
BO ZHANG
🏀
Browse files
removed dependency on system package
parent
eb26a19d
Changes
1
Show whitespace changes
Inline
Side-by-side
csst/msc/_photometry/csst_photometry.py
View file @
1faa615c
...
@@ -32,7 +32,8 @@ from scipy.interpolate import UnivariateSpline
...
@@ -32,7 +32,8 @@ from scipy.interpolate import UnivariateSpline
# import ..magfluxconvert as magf
# import ..magfluxconvert as magf
from
.magfluxconvert
import
asinhpogson
,
fluxerr2magerr
,
magerr2fluxerr
from
.magfluxconvert
import
asinhpogson
,
fluxerr2magerr
,
magerr2fluxerr
import
stats
import
stats
import
system
# import system
from
shutil
import
which
prog_dir
=
sys
.
path
[
0
]
prog_dir
=
sys
.
path
[
0
]
config_path
=
os
.
path
.
join
(
prog_dir
,
'config/'
)
config_path
=
os
.
path
.
join
(
prog_dir
,
'config/'
)
...
@@ -268,7 +269,8 @@ def get_psf(fitsfile, outdir=None, psf_size=101, degree=2, variability=0.3, fwhm
...
@@ -268,7 +269,8 @@ def get_psf(fitsfile, outdir=None, psf_size=101, degree=2, variability=0.3, fwhm
**kwd: keywords for PICK_PSFSTARS
**kwd: keywords for PICK_PSFSTARS
"""
"""
if
not
system
.
cmd_exists
(
'sex'
)
or
not
system
.
cmd_exists
(
'psfex'
):
# if not system.cmd_exists('sex') or not system.cmd_exists('psfex'):
if
which
(
"sex"
)
is
None
or
which
(
"psfex"
)
is
None
:
raise
OSError
(
'No sex or psfex SHELL command found! Please install'
)
raise
OSError
(
'No sex or psfex SHELL command found! Please install'
)
rootname
,
_
=
os
.
path
.
splitext
(
fitsfile
)
rootname
,
_
=
os
.
path
.
splitext
(
fitsfile
)
...
...
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