Skip to content

Instantly share code, notes, and snippets.

@orionlee
orionlee / lk_centroid_quadratic_trial.ipynb
Last active January 23, 2024 02:22
Lightkurve centroid_quadratic() behavior
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@orionlee
orionlee / LATTE_environment.yml
Created December 26, 2023 18:31
LATTE environment.yml, with Python 3.7.12, Windows 11
name: LATTE_dev
channels:
- conda-forge
- pytorch
- defaults
dependencies:
- astroquery=0.4.1=pyh9f0ad1d_0
- attrs=23.1.0=pyh71513ae_1
- autograd=1.6.2=pyhd8ed1ab_0
- backports=1.0=pyhd8ed1ab_3
@orionlee
orionlee / index.rst
Last active June 23, 2022 03:46
Lightkurve: Changes in `docs/source/reference` to add data-product specific documentation.

API

This page gives an overview of all lightkurve objects, functions and methods.

@orionlee
orionlee / test_bokeh_tap_select.ipynb
Last active April 9, 2022 14:42
Test bokeh tap select
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@orionlee
orionlee / test_compare_astropy_time.py
Created April 6, 2022 23:06
Illustrate running time difference between astropy `Time` comparison vs plain `ndarray` comparison
import platform; print(platform.platform())
import sys; print("Python", sys.version)
import numpy; print("Numpy", numpy.__version__)
import erfa; print("pyerfa", erfa.__version__)
import astropy; print("astropy", astropy.__version__)
# Test Time comparison running time used in timeseries aggregate_downsample()
@orionlee
orionlee / lk_filter_by_priority.py
Last active May 16, 2021 19:16
Lightkurve helper: filter search result by author priority
# Helper in the context of:
# https://github.com/lightkurve/lightkurve/issues/1048
import lightkurve as lk
from collections import OrderedDict
from astropy.table import Table
def map_cadence_type(cadence_in_days):
long_minimum = 9.9 / 60 / 24 # 10 minutes in days, with some margin of error
@orionlee
orionlee / tutorials-0x-using-interact_bls.ipynb
Last active September 24, 2020 00:13
Lightkurve Tutorial : using interact_bls()
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@orionlee
orionlee / LC_Processing_astropy_ts.ipynb
Last active September 19, 2020 16:22
Lightcurve processing - comparing Lightkurve 2alpha vs astropy TimeSeries
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@orionlee
orionlee / list_css_reserved_words_missing_in_codemirrror.js
Last active July 31, 2020 04:23
Script to semi-automatically generate missing CSS reserved words in CodeMirror
/* the list is obtained from from dev tool
propNameCamelCaseList = [];
for (k in document.body.style) {
if (typeof document.body.style[k] === 'function') {
continue;
}
propNameCamelCaseList.push(k);
}
propNameCamelCaseList.map(p => `'${p}'`).join(', ')
*/
@orionlee
orionlee / cm-js-mixed-demo.html
Created July 16, 2020 17:59
Demo for CodeMirror javascript-mixed mode.
<!doctype html>
<title>CodeMirror: JavaScript Mixed mode</title>
<meta charset="utf-8"/>
<link rel=stylesheet href="../../doc/docs.css">
<link rel="stylesheet" href="../../lib/codemirror.css">
<link rel="stylesheet" href="../../theme/blackboard.css">
<script src="../../lib/codemirror.js"></script>
<script src="../../addon/edit/matchbrackets.js"></script>