Giter Site home page Giter Site logo

vsquicciarini / madys Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 32.93 MB

MADYS: isochronal parameter determination for young stellar and substellar objects

Python 100.00%
astronomy direct-imaging gaia model-comparison parameter-estimation python sql stellar-astrophysics

madys's Introduction

Manifold Age Determination for Young Stars (MADYS)

Description

This repository hosts the code of MADYS: the Manifold Age Determination for Young Stars, a flexible Python tool for parameter determination of young stellar and substellar objects.

MADYS automatically retrieves and cross-matches photometry from several catalogs, estimates interstellar extinction, and derives parameter (age, mass, radius, Teff, logg, logL) estimates for individual objects through isochronal fitting.

Harmonising the heterogeneity of publicly-available isochrone grids, the tool allows to choose amongst several models, many of which with customisable astrophysical parameters. Particular attention has been dedicated to the categorization of these models, labeled through a four-level taxonomical classification.

At the moment of writing, MADYS includes 20 models, 140 isochrone grids, and more then 250 photometric filters (a thorough description of each of them is provided). However, despite our efforts, the model list is far from being complete. If you wish a new model to be included in a new version of MADYS, or a new set of photometric filters to be added to the current list, feel free to get in contact with us.

Five classes are defined to handle a large variety of possible applications, spanning from the characterization of directly-imaged planets to the study of stellar associations. Notably, large direct imaging survey will benefit from MADYS' capability to compute planetary masses corresponding to detection limits of direct imaging observations.

Finally, several dedicated plotting functions are included to allow a visual perception of the numerical output.

Latest news:

Apr 28, 2024 - Version v1.3.0 published! Expanded the features of the CurveObject class; added Hipparcos catalog and Gaia DR3-Hipparcos proper motion to the automatic ADQL query done by SampleObject; increased completeness of catalog cross-matches; improved readability of code following Docstring Conventions (PEP 8).

Jan 22, 2024 - Version v1.2.0 published! A more accurate parameter derivation was introduced when providing [age_opt, age_min, age_max] triplets; SampleObject instances can now be merged; a higher degree of control of plotting options is now possible; fixed minor bugs.

Oct 18, 2023 - Version v1.1.0 published! Several new functionalities added: a class to handle the conversion of direct imaging contrast curves into mass curves; functions to easily export/import SampleObject and FitParams instances; a new attribute of SampleObject containing information on photometric quality. Better exploitation of log files; better handling of output files and objects; general improvement of computational performances.

Oct 10, 2023 - MADYS has now a full documentation on readthedocs. Have a look at it!

Sep 09, 2023 - Version v1.0.0 published! Newly added models: Dartmouth (magnetic and non-magnetic, Feiden 2016), solar-metallicity PARSEC v2.0 (Nguyen et al. 2022), latest version of ATMO (Chabrier et al. 2023); added JWST filters to PARSEC (v1.2 and v2.0) isochrones, and Gaia, 2MASS, Panstarrs and HST filters to ATMO 2020. Inserted possibility to estimate synthetic photometry for fitted objects in bands not employed when deriving their parameters.

Feb 17, 2023 - Changed default queried catalog from Gaia DR2 to Gaia DR3 when providing a list of stars with non-Gaia identifiers (i.e., with 'id_type'='other').

Jan 19, 2023 - Added the possibility to take into account uncertainties on E(B-V) values, which can now be provided at inizialization through a dedicated keyword 'ebv_err'.

Aug 03, 2022 - Sloan Digital Sky Survey added to the list of automatically searchable surveys. Its filters are now available with the following models: PARSEC, MIST, AMES-Dusty, AMES-Cond, BT-Settl, NextGen.

Jun 20, 2022 - BEX models (Linder et al. 2019, Marleau et al. 2019) added to the list of available models.

Jun 17, 2022 - Gaia DR3 now available! The new catalog replaces, for all intents and purposes, Gaia EDR3.

Installation:

Catalog queries are mediated by the TAP Gaia Query package (tap). If you import madys from the command line, the module is automatically installed if not found. However, this does not work from Jupyter Notebook. We suggest to manually install the package from pip, through:

pip install git+https://github.com/mfouesneau/tap

Please make sure you use the command above, as just using pip install tap will download a different, although eponymous, package.

Note that TAP Gaia Query might require the installation of lxml (v4.6.3).

Once TAP Gaia Query is installed, the current MADYS repository can be installed using pip:

pip install madys

Note that, when using for the first time an extinction map, MADYS will download the relevant file (0.7 GB or 2.2 GB, depending on the map).

Requirements

This package relies on usual packages for data science and astronomy: numpy (v1.18.1), scipy (v1.6.1), pandas (v1.1.4), matplotlib (v3.3.4), astropy (v4.3.1) and h5py (v3.2.1).

In addition, it also requires astroquery (v0.4.2.dev0) and TAP Gaia Query (v0.1). The latter package might require the installation of lxml (v4.6.3).

Examples

The package is fully documented on readthedocs.io:

https://madys.readthedocs.io/en/latest/

and a detailed description of its features, together with several examples of the kind of scientific results that can be obtained with it, is provided in Squicciarini & Bonavita (2022).

We recommend you check out the examples provided and the docs, for a better understanding of its usage.

If you find a bug or want to suggest improvements, please create a ticket.

Recent papers using MADYS:

MADYS has already been employed, starting from its preliminary forms, in several publications, including:

Authors

Vito Squicciarini, LESIA - Observatoire de Paris, FR ([email protected])

Mariangela Bonavita, The Open University, UK

We are grateful for your effort, and hope that these tools will contribute to your scientific work and discoveries. Please feel free to report any bug or possible improvement to the authors.

Attribution

Please cite Squicciarini & Bonavita (2022) whenever you publish results obtained with MADYS.

madys's People

Contributors

mbonav avatar vsquicciarini avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

madys's Issues

[Errno 104] Connection reset by peer

When I tested your program, I found it could not run.
For a small sample size, it can run smoothly,such as
star_list=['Gaia DR3 537529798644191232','Gaia DR3 1087909890317863040', 'Gaia DR3 5836041389104329216', 'Gaia DR3 987536165308035328', 'Gaia DR3 4225093954826903680']
p2=madys.SampleObject(star_list,id_type='DR3',ext_map=None)
p2.phot_table
2022-07-10 18-44-28 的屏幕截图

but for a large sample size, it cannot obtain data,such as
f='1000stars.csv' #1000 random stars
p1=madys.SampleObject(f,id_type='DR3',ext_map='leike',verbose=0) #collects data
p1.phot_table

ConnectionResetError: [Errno 104] Connection reset by peer

During handling of the above exception, another exception occurred: ConnectionError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))

Is it because the sample size is too large to refuse data query, or is it because of my network?

The closest model (M1) to the input has: {'feh': -0.25}, but a closer match (M2) was found in the MADYS database: {'feh': 0.0, 'afe': 0.0, 'v_vcrit': 0.0, 'fspot': 0.0, 'B': 0, 'he': 0.27}.

Hi! I'm glad you can add more models, but I seem to have encountered new problems...
I only downloaded parsec_m0.25 model. When I set feh=-0.25, it shows that the best model is feh=0.00, not feh=-0.25. When I choose “N”, it will directly lead to failure to run.
Do I have to change other parameters so that it uses the parsec_m0.25 model instead of the parsec_p0.00 model?

els_file='/home/yang/Madys/els.txt' els_obj=madys.SampleObject(els_file,id_type='DR3',verbose=0,ext_map='leike',feh=-0.25) result=els_obj.get_params('parsec',age_range=[1,400],n_try=200)

`The closest model (M1) to the input has: {'feh': -0.25}, but a closer match (M2) was found in the MADYS database:
{'feh': 0.0, 'afe': 0.0, 'v_vcrit': 0.0, 'fspot': 0.0, 'B': 0, 'he': 0.27}.
Do you want me to download this model? Press 'N' to use M1 instead. [Y/N]:N

ValueError: Model parsec_p0.00 not found. Are you sure it is in your search path?`

All-NaN slice encountered

Hi, I encountered the following problems when testing example.When I convert the model from'bhac15'to' parsec ', the returned results are all null values

els_file='els.txt'

els_obj=SampleObject(els_file,id_type='EDR3',verbose=0,ext_map='leike') result=els_obj.get_params('parsec',age_range=[1,300],n_try=200,save_maps=True)

/home/yang/anaconda3/envs/madys/lib/python3.7/site-packages/madys/madys.py:3299: RuntimeWarning: All-NaN slice encountered
if np.nanmin(np.abs(iso_data_r[use_i,w[h]]-ph))<0.2: b[h]=True #if the best theor. match is more than 0.2 mag away, discards it

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.