从NASA的开普勒太空船观测到的像素数据中创建美丽的快速查看电影。
项目描述
从NASA的开普勒/K2/TESS太空望远镜观测到的像素数据创建快速查看电影。
K2flix使得检查NASA的开普勒和TESS空间望远镜获取的CCD像素数据变得容易。
这个工具的需求源于所有望远镜数据都受到噪声源的影响,如指向抖动和前景小行星,这些通常比算法更容易用肉眼识别。
这个工具以开普勒或TESS的目标像素文件(TPF)作为输入,并将它们转换为对比度拉伸的动画GIF或MPEG-4电影。这些TPF文件可以从开普勒档案、K2档案或TESS模拟中公开获取。
K2flix可以作为命令行工具或使用其Python API使用。
示例
小行星经常在开普勒/K2目标前通过。我们可以使用k2flix创建两天像素数据的动画,以查看飞过的小行星。
$ k2flix --start 545 --stop 680 --step 1 --fps 12 --stretch linear --ut http://archive.stsci.edu\ /missions/k2/target_pixel_files/c1/201500000/72000/ktwo201572338-c01_lpd-targ.fits.gz
要查看更多示例,请关注Twitter上的@KeplerBot!
安装
如果您系统上已安装Python,则可以使用pip安装k2flix
$ pip install k2flix
或者,您可以通过安装源代码获取最新版本
$ git clone https://github.com/barentsen/k2flix.git $ cd k2flix $ python setup.py install
使用k2flix
安装后,k2flix工具将在命令行中可用。您可以使用以下方式使用它。
将开普勒像素文件转换为动画GIF
$ k2flix tpf-file.fits.gz
将开普勒像素文件转换为MPEG-4电影
$ k2flix --o movie.mp4 tpf-file.fits.gz
K2flix支持从网络URL读取,因此您可以直接从数据存档生成电影
$ k2flix https://archive.stsci.edu/missions/k2/target_pixel_files/c1/201400000/00000/ktwo201400022-c01_lpd-targ.fits.gz
要查看所有选项,请使用–help参数查看完整的使用信息
$ k2flix --help
usage: k2flix [-h] [-v] [--output FILENAME] [--start START] [--stop STOP]
              [--step STEP] [--fps FPS] [--binning BINNING] [--dpi DPI]
              [--stretch STRETCH] [--min_cut MIN_CUT] [--max_cut MAX_CUT]
              [--min_percent %] [--max_percent %] [--cmap CMAP] [--flags]
              [--raw | --background | --cosmic]
              [--ut | --jd | --mjd | --bkjd | --cadence]
              tpf_filename [tpf_filename ...]
Converts a Target Pixel File (TPF) from NASA's Kepler/K2/TESS spacecraft into
an animated gif or MPEG-4 movie for human inspection.
positional arguments:
  tpf_filename       path to one or more Target Pixel Files (TPF)
optional arguments:
  -h, --help         show this help message and exit
  -v, --verbose
  --output FILENAME  .gif or .mp4 output filename (default: gif with the same
                     name as the input file)
  --start START      first frame to show. Give the frame number (default 0),
                     or a Julian Day if --jd/--mjd/--bkjd is set, or a cadence
                     number if --cadence is set.
  --stop STOP        final frame to show. Give the frame number (default: -1),
                     or a Julian Day if --jd/--mjd/--bkjd is set, or a cadence
                     number if --cadence is set.
  --step STEP        spacing between frames (default: show 100 frames)
  --fps FPS          frames per second (default: 15)
  --binning BINNING  number of cadence to co-add per frame (default: 1)
  --dpi DPI          resolution of the output in dots per K2 pixel (default:
                     choose a dpi that produces a 440px-wide image)
  --stretch STRETCH  type of contrast stretching: "linear", "sqrt", "power",
                     "log", or "asinh" (default is "log")
  --min_cut MIN_CUT  minimum cut level (default: use min_percent)
  --max_cut MAX_CUT  maximum cut level (default: use max_percent)
  --min_percent %    minimum cut percentile (default: 1.0)
  --max_percent %    maximum cut percentile (default: 95)
  --cmap CMAP        matplotlib color map name (default: gray)
  --flags            show the quality flags
  --raw              show the uncalibrated pixel counts ('RAW_CNTS')
  --background       show the background flux ('FLUX_BKG')
  --cosmic           show the cosmic rays ('COSMIC_RAYS')
  --ut               use Universal Time for annotation (default)
  --jd               use Julian Day for annotation and --start/--stop
  --mjd              use Modified Julian Day for annotation and --start/--stop
  --bkjd             use Kepler Julian Day for annotation and --start/--stop
  --cadence          use Cadence Number for annotation and --start/--stop
引用
此工具由NASA开普勒/开普勒客座观测员办公室的Geert Barentsen创建。如果此工具帮助了您的科研,请包含引用。代码已在天体物理学源代码库中注册[ascl:1503.001],首选的BibTeX条目为
@MISC{2015ascl.soft03001B,
  author        = {{Barentsen}, G.},
  title         = "{K2flix: Kepler pixel data visualizer}",
  howpublished  = {Astrophysics Source Code Library},
  year          = 2015,
  month         = mar,
  archivePrefix = "ascl",
  eprint        = {1503.001},
  adsurl        = {http://adsabs.harvard.edu/abs/2015ascl.soft03001B},
  adsnote       = {Provided by the SAO/NASA Astrophysics Data System},
  doi           = {10.5281/zenodo.15576},
  url           = {http://dx.doi.org/10.5281/zenodo.15576}
}
贡献
要报告错误和请求功能,请使用问题跟踪器。代码贡献非常欢迎。
许可证
版权所有2016 Geert Barentsen。K2flix是在MIT许可证下提供的免费软件。有关详细信息,请参阅LICENSE文件。
项目详情
k2flix-2.4.0.tar.gz的哈希值
| 算法 | 哈希摘要 | |
|---|---|---|
| SHA256 | 6a9f285a3b6251dd5efff1dde02b2493255387d8febed421a7a565ee18ed544f | |
| MD5 | 2aff3015f427aa667f5b26aa0f6167de | |
| BLAKE2b-256 | c2faa89a609546fc8dc1d1dd8887339c5b58c3d8d349e079c1c6567012e6ead7 |