You are browsing as a guest. Sign up (or log in) to start making projects!

6h 56m 49s logged

Analysis script

holy rupnil judgement

so if you dont know in this project i am just getting the light curve
data from a library, other than that i am doing EVERYTHING from scratch,
so this is the 7 hour dev log of what i did in my analysis script.


bls.py

most time was spent here trying to write Box Least Square algorithm
from scratch, it will be used to find the orbital period of the planet
from the folded data, i wrote various versions in order to find the
correct and best way to do it and had to fix shit ton of bugs, which i
wrote down for this dev log (check below)

analysis.py

after lot of rough work focused around Kepler 8 star in bls.py i
transfered the BLS and other refining functions to analysis script for a
proper cli, it takes detrended data json file and outputs:

  1. orbital period of planet
  2. confidence score (calculated from depth of transit)
  3. duration of transit (calculated two different ways)
  4. phase start

hella problems i faced

  1. performance in BLS algo: the very first version i wrote had a triple
    loop, it was like 2+ billion operations so it was taking like 7 minutes
    to complete and give wrong orbital period, then i switched to numpy to
    use vectorization and it made it hella fast, dropped the time to just 60
    seconds
  2. “aliases”: later i found out that i was not getting wrong orbital
    period it was just different multiples of the period, so i had to make a
    function check_aliases which gets the first 4 values of period it
    could find and the aliases[0] is the best one with highest score
  3. precision: the values were never precise and the reason was that the
    BLS seach wasnt enough, what i needed to do was a coarse search and get a
    general idea of transt and do a more precise search on top of the
    coarse values which i did with a function i made bls_search_two_pass
    who’s period was then correct but with lower score and another multiple
    was still with higher score, so after hella digging i found that it was a
    like chicken and egg problem yk, see the BLS search needs duration to
    calculate stuff better and we dont know that duration, we can get the
    duration by doing some calculations on period but to get period we need
    to do BLS search, so at first i used a constant value 0.4 of duration
    after some manual experimenting, which works as a decent enough
    heuristic at first, then after we get a nice period i use the
    refine_duration function which then digs in and calculates the best
    duration value, which is THEN used to run another BLS search this time
    with proper suitable duration. so it went like: bls coarse search
    -> bls precise search -> bls alias calculation -> duration refining -> anoher precise search and then we come to proper
    orbital period with highest score, FINALLY.

this dev log was MUCH bigger but got deleted cuz it wasnt saved and this fucking error deleted it, now i am too frustrated and idc enough to write it completey again this is all i had saved

0
9

Comments 0

No comments yet. Be the first!