Skip to main content

JASMINE: Joint Analysis of Simulations for Microlensing INterest Events'

Project description

jasmine

JASMINE: Joint Analysis of Simulation for Microlensing INterested Events


Installing from github (should be most updated available version):

git clone https://github.com/stelais/jasmine.git
cd jasmine
pip install ./

pip installable as a pip package jasmine-astro (usually a bit behind the latest version, but stable):

pip install jasmine-astro

Description below will probably work, but is outdated. Let us know if you need help with the package.

1. Reading RTModel outputs

ModelResults class

from jasmine import ModelResults
model = ModelResults(file_to_be_read='[your_path]/[Final]Models/LX0000-1.txt')
print(model.model_type, model.model_extensive_name)
print(model.model_parameters)

See notebook analysis/reading_rtmodel_models.ipynb


2. Generating a Binary lens signal based on one of the 113 RTModel templates

RTModelTemplateForBinaryLightCurve class

from jasmine import RTModelTemplateForBinaryLightCurve
rtmodel_template_two_lenses = RTModelTemplateForBinaryLightCurve(template_line=2,
                                                                     path_to_template=template_path,
                                                                     input_peak_t1=300,
                                                                     input_peak_t2=302)
magnification, times = rtmodel_template_two_lenses_.rtmodel_magnification_using_vbb()

See notebook analysis/generating_lightcurves_from_rtmodel_templates.ipynb


3. Microlensing Data Challenge Simulations

Splitting master file

  1. Make sure you downloaded the master_file.txt and wfirstColumnNumbers.txt from the data challenge folder:
    https://github.com/microlensing-data-challenge/data-challenge-1/tree/master/Answers
  2. Run python jasmine/files_organizer/data_challenge_prep.py , changing path as needed. It splits master file and create 4 new files:
    • binary_star.csv
    • bound_planet.csv
    • cataclysmic_variables.csv
    • single_lens.csv

Using the LightcurveEventDataChallenge class:

from jasmine import LightcurveEventDataChallenge
the_lightcurve = LightcurveEventDataChallenge(2) # Binary star # Call the lightcurve class
vars(the_lightcurve).keys() # See what are the available attributes and subclasses
the_lightcurve.lens # subclass
lightcurve_datapoints = the_lightcurve.lightcurve_data(filter_='W149', folder_path_='../data') # Get the lightcurve datapoints

See notebook analysis/getting_information_about_a_lightcurve.ipynb for details.


If you opt to not use a class. You can use the functions below: See notebook analysis/reading_the_data_challenge.ipynb for more details.

1. Reading the four master csv files

Call the function you need, and it returns a pandas dataframe:
import jasmine.files_organizer.data_challenge_reader as dcr

  • dataframe = dcr.binary_star_master_reader()
  • dataframe = dcr.bound_planet_master_reader()
  • dataframe = dcr.cataclysmic_variables_master_reader()
  • dataframe = dcr.single_lens_master_reader()

Obs: The column you are looking for is: data_challenge_lc_number.

2. Reading the light curve data points files

The function lightcurve_data_reader reads the light curve files and returns a pandas dataframe with BJD, Magnitude, Error and days (days = BJD - 2450000) ':

import jasmine.files_organizer.data_challenge_reader as dcr
lightcurve_df = dcr.lightcurve_data_reader(data_challenge_lc_number_=5, folder_path_='../data')

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

jasmine_astro-0.2.3.tar.gz (7.5 MB view details)

Uploaded Source

Built Distribution

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

jasmine_astro-0.2.3-py3-none-any.whl (943.3 kB view details)

Uploaded Python 3

File details

Details for the file jasmine_astro-0.2.3.tar.gz.

File metadata

  • Download URL: jasmine_astro-0.2.3.tar.gz
  • Upload date:
  • Size: 7.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for jasmine_astro-0.2.3.tar.gz
Algorithm Hash digest
SHA256 63003b14195eb51ba6c8c4aa659a62734709c9df8ce56472c0d7152cbb2eaea5
MD5 d19caaf80e1aefeba30eabdce1d6ad2e
BLAKE2b-256 d67ade4614aefdc1cf620a6fcb23cb3a09c8511a0b2bca8ecfe15a56f03cd0b8

See more details on using hashes here.

File details

Details for the file jasmine_astro-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: jasmine_astro-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 943.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for jasmine_astro-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 fa548ec972316251b72e1c8da5e616409790e917dff22a82056f597f4e367eb5
MD5 4d365cfcd40caf715a761a5b8352035d
BLAKE2b-256 d805c1562e728d51f965d5719138f68acc72585661fd3cda0f279eab26fec98f

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