Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
michitaro
hsc-release-faq
Commits
24d3e1c5
Commit
24d3e1c5
authored
Feb 10, 2017
by
michitaro
Browse files
Add new file
parent
3e37c6d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
butler_example.py
0 → 100644
View file @
24d3e1c5
# python module calling butler
import
lsst.daf.persistence
as
dafPersist
# Specify rerun directory in which the data you want to use is stored
dataDir
=
"~/hsc/rerun/<rerun name>"
# Call butler
butler
=
dafPersist
.
Butler
(
dataDir
)
# Specify the target data and searched by butler
#
# CORR-0902798-59.fits
# 'calexp' means CORR-*.fits
# For calexp type data, you need to specify visit and ccd in dataId
dataId
=
{
'visit'
:
902798
,
'ccd'
:
59
}
exp
=
butler
.
get
(
'calexp'
,
dataId
)
# put the settings in a dict object and call ds9.mtv()
settings
=
{
'scale'
:
scale
,
'zoom'
:
zoom
,
'mask'
:
'transparency 60'
}
ds9
.
mtv
(
exp
,
frame
=
frame
,
title
=
title
,
settings
=
settings
)
# get the exposure from the butler
sources
=
butler
.
get
(
'src'
,
dataId
)
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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