Skip to main content

Two packages that can be used to estimate the metallicity of stars from the CSST filter systems

Project description

CSST_feh

The code is used to estimate the metallicity of stars from the CSST filter systems. It is worth noting that only FGK-type stars are valid.
dwarf_feh is a astronomy Python package specifically designed to estimate the metallicity of the dwarf stars from the CSST filter systems.
giant_feh is a astronomy Python package specifically designed to estimate the metallicity of the giant stars from the CSST filter systems.

How to install

#from PyPI
python3 -m pip install CSST_feh

Quick start

The input are u, g and i magnitudes and color error. The three magnitudes can be given from photometric data. An assumption that magnitudes are independent Gaussian variables is made. We recommend that the error of the magnitude should not be larger than 0.025 mag. The color error represents the combination of the error of two magnitudes.
If you want to estimate the metallicity of the dwarf stars, you should use dwarf_feh package.

from CSST_feh import dwarf_feh
dwarf_feh.dwarf_feh(u,g,i,error)

The output is one file named dwarf_feh_predicted.csv, the first column stores the photometric metallicity and the secnd column stores the random error of photometric metallicity.
For the giant stars, you should use giant_feh package.

from CSST_feh import giant_feh
giant_feh.giant_feh(u,g,i,error)

The output is one file named giant_feh_predicted.csv, the first column stores the photometric metallicity and the secnd column stores the random error of photometric metallicity.

An example

If a file (dwarf_feh.csv) is given, u, g, i magnitudes are contained in this file. Once the color error is given, you can precess the data through the command line like this.

image

py
import pandas as pd
data=pd.read_csv('dwarf_feh.csv')
u0=data.loc[:,['u']].values
g0=data.loc[:,['g']].values
i0=data.loc[:,['i']].values
u,g,i=u0.flatten(),g0.flatten(),i0.flatten()
# give the color error
error=(0.01**2+0.01**2)**0.5
# estimate the metallicity of the dwarf stars
from CSST_feh import dwarf_feh
dwarf_feh.dwarf_feh(u,g,i,error)

The output is one file named dwarf_feh_predicted.csv, the first column stores the photometric metallicity and the secnd column stores the random error of photometric metallicity.

API

dwarf_feh(u,g,i,error)

Args:
    u: array-like, shape (n, )
       CSST u band
    
    g: array-like, shape (n, )
       CSST g band
       
    i: array-like, shape (n, )
       CSST i band
       
    error: float
       color error. An assumption that (u-g) and (g-i) are independent Gaussian variables is made.

giant_feh(u,g,i,error)

Args:
    u: array-like, shape (n, )
       CSST u band
    
    g: array-like, shape (n, )
       CSST g band
       
    i: array-like, shape (n, )
       CSST i band
       
    error: float
       color error. An assumption that (u-g) and (g-i) are independent Gaussian variables is made.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

csst_feh-0.0.2.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

csst_feh-0.0.2-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file csst_feh-0.0.2.tar.gz.

File metadata

  • Download URL: csst_feh-0.0.2.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.7

File hashes

Hashes for csst_feh-0.0.2.tar.gz
Algorithm Hash digest
SHA256 da8dae5d41c656e0f029f3ad1f3333704a3a334894e74073d27ef65e7a0aa732
MD5 16ea682b67fd243f84c96721169f00b0
BLAKE2b-256 eee5b1395dd3ead36f377554e3f5335be2a1b38178132ce45a986564abbbd956

See more details on using hashes here.

File details

Details for the file csst_feh-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: csst_feh-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.7

File hashes

Hashes for csst_feh-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4b0dfbd322097b15010354781413cf698ad3a6d72b8c1e0d891747a3d4dbf7f4
MD5 ca0a1f7ec9fd48a03321c29cb8caeaab
BLAKE2b-256 32c2ed8e8353ca517685789e5928ea604d8b4c85c78318d2b172b1bfa3f3dd85

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page