Science

discussion

How to fold a light curve using Excel

Started by kianjin
Default_user
over 5 years ago

I've used kianjin's MOD() function and tested it on individual 30-ish day observational periods from several .csv files downloaded from planethunters. One word of caution I've spotted. I think I've found a shutter effect from the fact that Kepler (I seem to recall reading somewhere) takes one observation every thirty minutes or so. If you set the estimated period to 0.67433 days (or integer multiples and indeed fractions, e.g., 2,3,*4 .. and /2,/3,/4 ..) you will see the folded curve stack up in straight vertical lines. This could be a potential problem for orbital periods which are around these periods. I have only tested this on Q1.0 data for a small number of stars, and Q2.0 for one.

Default_user
over 5 years ago
Teradil in response to Greg*

Greg*:

Hi,

getfits works well but then I've just a little problem with kfit :

kfits -mr kp4678171llc.fits >4678171.csv

IOError: [Errno 22] La syntaxe du nom de fichier, de rÚpertoire ou de volume est

incorrecte: 'kp4678171llc.fits'

meaning in english : incorrect syntax on the file name or directory.

It does not like the "*"

If I give the full name (only one file) it works. Did you have this problem ?

Greg

For anyone having the same problem with the python script, just locate this part in kfits.py:

if sys.platform == 'win32': # windows does not do wildcard expansion, so expand it ourselves

import fnmatch



fnargs=[]



for i in range(0,len(args)):



    fnargs += fnmatch.filter(os.listdir('.'),args[i])

and replace it with this part:

if sys.platform == 'win32': # windows does not do wildcard expansion, so expand it ourselves

import fnmatch



fnargs=[]



for i in range(0,len(args)):



    fnargs += fnmatch.filter(os.listdir('.'),args[i])



args = fnargs

It's only the last line, that is added, after that it works (at least) on Win7/64bit without any problems.

Thanks to kianjin for these tools.

Default_user
almost 3 years ago

I try to do this in LibreOffice, but I don't know at all how this PDCSAP_FLUX can be converted from 5 digits(probably it is the ADU counts of the ccd sensor of Kepler scope) to 1s and 0s (change in magnitude). How we do this?? And there is another crucial question: In order to find much longer periods, we need to merge some quarters together. How can this been done in LibreOffice? Plus a detail I need to know: What we do with those NULL ponits (in time AND in Flux)?? If we let them, we will certainly get this annoying "#VALUE!" thing. Probably the same if we let those cells empty. What we do with this?

Sorry for the silly questions.

John

Default_user
almost 3 years ago
Ptd in response to john m.

john m.:

I try to do this in LibreOffice, but I don't know at all how this PDCSAP_FLUX can be converted from 5 digits(probably it is the ADU counts of the ccd sensor of Kepler scope) to 1s and 0s (change in magnitude). How we do this?? And there is another crucial question: In order to find much longer periods, we need to merge some quarters together. How can this been done in LibreOffice? Plus a detail I need to know: What we do with those NULL ponits (in time AND in Flux)?? If we let them, we will certainly get this annoying #VALUE!" thing. Probably the same if we let those cells empty. What we do with this?

Sorry for the silly questions.

John

Not sure why you want to turn the flux value into 1s and 0s? Its an analogue value recorded every 30 mins.

To stitch quarters together you need to have used the fits files http://archive.stsci.edu/pub/kepler/lightcurves/ (because the time stamps in those are untampered with), next normalize the flux values in the relevant quarters, then simply cut/paste the quarters into one table of values.

To get rid of the null points, I simply sort each quarter by flux value and delete any rows with obviously spurious/missing values, then resort back to correct time order. I recommend doing this data cleaning as the first operation once you've converted the fits files to csv using TOPCAT and opened them in Libra Office(which I also use).

I've had problems using charts in Libra Office once I finally get to the point of wanting to see my folded data, its seems to be very computationally intensive and it can take my PC, which isn't particularly powerful, several minutes to give me the goods.

Hope I've answered your questions

Ptd

Please Log In to make comments.