Skip to main content

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')

Metadata

Release files for jasmine-astro 0.4.3

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

Source distribution (sdist)

Source distribution for jasmine-astro 0.4.3
File Size Uploaded
jasmine_astro-0.4.3.tar.gz 2.7 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for jasmine-astro 0.4.3
File Interpreter ABI Platform
jasmine_astro-0.4.3-py3-none-any.whl Python 3 none any Details

Total release size: 2.8 MB

Release files / jasmine_astro-0.4.3.tar.gz

Download URL jasmine_astro-0.4.3.tar.gz
Size 2.7 MB
Tags Source
SHA-256 checksum
How to use checksums
e3e08d12cfdf65275dae58b33cd113a69ea7f95ee858839e0f71399c963631d9
BLAKE2b-256 checksum
How to use checksums
f0bedc7954f77aaed336eeb859ea3fbd6c6aa259d1b05efc6ab3443754e14302
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Hatch/1.16.5 cpython/3.13.13 HTTPX/0.28.1

Release files / jasmine_astro-0.4.3-py3-none-any.whl

Download URL jasmine_astro-0.4.3-py3-none-any.whl
Size 128.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0515ca33001db581d88da296876619b6a6fe495719342d305a4c97b1f6003709
BLAKE2b-256 checksum
How to use checksums
9f21e81b807f585adb977059ada887bc5aa4f0be74e25c3fae7f26ebb667b8b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Hatch/1.16.5 cpython/3.13.13 HTTPX/0.28.1

Release history Release notifications | RSS feed

This release

0.4.3 This release

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.3.0

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.4.7

1 release file

0.1.4.6

1 release file

0.1.4.5

1 release file

0.1.4.4

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

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