Skip to main content

pyaXeHelper

Installation

pip install pyaxehelper

This package contains functions helping pyaXe. This works with:

- pyaxe version '0.1.dev29+gf57de55.d20200106'

- sextractor version 2.19.5 (2014-11-16)

Functions include:

- change_catalog_order() edits and removes column order in a sextractor catalog. This is required by pyaxe as discussed in [#5](https://github.com/spacetelescope/pyaxe/issues/5) and [#6](https://github.com/spacetelescope/pyaxe/issues/6).

- change_magiso2magwavelength() edits a column in a sextractor catalog from MAG_ISO to MAG_F[WAVELENGTH] (e.g., MAG_F1392 for F140W images). This is required by pyaxe as discussed in [#5](https://github.com/spacetelescope/pyaxe/issues/5) and [#6](https://github.com/spacetelescope/pyaxe/issues/6).

- write_catalog() saves a text file similar to a sextractor catalog given a pandas dataframe.

- read_catalog() returns pandas dataframe of information in a sextractor catalog.

- select_source() returns an object from a sextractor catalog which is the closest to a given RADEC.

- make_meta() takes a list of files (both grism and direct) and reads their headers. Necessary information (e.g., filepath, filter, and expstart) are extracted and recorded in a dictionary form. This also calls _make_pairs() to make a suggestion for grism-direct pairs by selecting the grism-direct images having the closest expstart.

- _make_pairs() is internally used by make_meta() to return a suggestion of grism-direct pairs.

- prepare_folders() helps preparing folders GRISM/ and DIRECT/. It takes the dictionary output from make_meta() with the grism-direct pair suggestion (i.e., only GID is the input for this function), and processes grism and direct files stated in the dictionary. Each file is copied to the corresponding location. GRISM.lis and DIRECT.lis are constructed at the end.

- make_axelis() constructs an aXe.lis file. It takes GID (i.e., an output from make_meta) and utilizes grism-direct pair info.

- calculate_median() calculates median fluxes with sigma clipping using common wavelength grids (i.e., [WMIN,WMAX] with DW bin width. It reads lambdas and fluxes from pyaxe outputs (i.e., OUTPUT/*2.SPC.fits or OUTPUT/*2_opt.SPC.fits) given an object ID and the file list (i.e., FILES). Interp1d model is constructed, and is used to interpolate fluxes to the common grids. It returns WGRID and dataframe containing the common wavelength grids and dataframe of fluxes (columns: image number and median at the last column, row: parallel to the common wavelength grids), respectively.

Known issues:

- ?

v.1.2.0

- Implement: calculate_median

v.1.1.0

- This version mainly implement helpers to reduce the amount of manual works required such as making grism-direct pairs, copying files to folders, and making .lis files.

- Implement: make_meta, _make_pairs, prepare_folders, make_axelis

v.1.0.0

- This version mainly implements helpers to construct a sextractor catalog to be complied with pyaxe requirements.

- Implement: change_catalog_order, change_magiso2magwavelength, write_catalog, read_catalog, select_source

Metadata

Release files for pyaxehelper 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyaxehelper 1.2.0
File Size Uploaded
pyaxehelper-1.2.0.tar.gz 5.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyaxehelper 1.2.0
File Interpreter ABI Platform
pyaxehelper-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.5 kB

Release files / pyaxehelper-1.2.0.tar.gz

Download URL pyaxehelper-1.2.0.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
9bf54563e00b6ce6ea0e1facbcf411ef7488979e325980d566788b5ef7b482e7
BLAKE2b-256 checksum
How to use checksums
7d6890c39e2b19c6ddcf8382a52b3193d27ba4809566c9a1730e4b47d4957381
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0.post20200106 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.5

Release files / pyaxehelper-1.2.0-py3-none-any.whl

Download URL pyaxehelper-1.2.0-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4ecb08716ba5d01d34df52c6489d2f8e25fefa6fb9270d4980bedad87b3eb692
BLAKE2b-256 checksum
How to use checksums
fa19be589402ee4581f2599e79224f92144a3e29accf251c53886ae2661d1871
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0.post20200106 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.5
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page