benmontet / f3

Full Frame Fotometry from the Kepler Full Frame Images
MIT License
20 stars 6 forks source link

About the make_postcard method. #3

Closed RuiningZHAO closed 6 years ago

RuiningZHAO commented 6 years ago

Hi there, I have 2 questions about the second step, i.e., target.make_postcard() in the demo:

  1. It always returns the following warnings for whichever source I tried. Should I just ignore them?
    WARNING:root:Unrecognized parameter: 'u_SDSS'
    WARNING:root:Unrecognized parameter: 'g_SDSS'
    WARNING:root:Unrecognized parameter: 'r_SDSS'
    WARNING:root:Unrecognized parameter: 'i_SDSS'
    WARNING:root:Unrecognized parameter: 'z_SDSS'
    WARNING:root:Unrecognized parameter: 'err_u_SDSS'
    WARNING:root:Unrecognized parameter: 'err_g_SDSS'
    WARNING:root:Unrecognized parameter: 'err_r_SDSS'
    WARNING:root:Unrecognized parameter: 'err_i_SDSS'
    WARNING:root:Unrecognized parameter: 'err_z_SDSS'
    WARNING:root:Unrecognized parameter: 'extinction_u_SDSS'
    WARNING:root:Unrecognized parameter: 'extinction_g_SDSS'
    WARNING:root:Unrecognized parameter: 'extinction_r_SDSS'
    WARNING:root:Unrecognized parameter: 'extinction_i_SDSS'
    WARNING:root:Unrecognized parameter: 'extinction_z_SDSS'
    WARNING:root:Unrecognized parameter: 'ug_SDSS'
    WARNING:root:Unrecognized parameter: 'gr_SDSS'
    WARNING:root:Unrecognized parameter: 'gi_SDSS'
  2. How much time does the make_postcard take typically, for my code always gets stuck in this step for hours.
benmontet commented 6 years ago

1) Yeah, definitely feel free to ignore those warnings! Those come from the kplr module trying to interact with all the columns the MAST API is returning and having extra columns returned beyond what it's looking for. Has no effect on f3. There's a version of kplr floating around where this isn't an issue, but it's not the one on pip unfortunately.

2) With the default settings it takes just a few seconds on my machine. Hours is definitely a problem! The main sink here is that it has to loop through loading all the FFIs, which are big files. I guess my first check would be to make sure you have enough memory to be able to open the FFIs and they are located where you think they are on your hard drive (although if not I think it would fail, rather than hanging)

RuiningZHAO commented 6 years ago

Thanks for your reply. I just checked again and found I did it in a right way even it took almost one hour. And also I timed the code in make_postcard() method line by line. It takes around 4s to load an individual FFI fits file with the fits.open() function in astropy.io and 13s for the line img = a[channel[season]].data. These two lines domain the running time. So nothing goes wrong here. What I need may be a much more advanced machine. :) Thanks anyway.

benmontet commented 6 years ago

Yeah, that's just your computer struggling to load a big file then, and there are 52 of those big files. Each of those takes a fraction of a second on my 2017 MBP, and the same on a late 2014 model. The only solution I've got for you is to download more ram (or manipulate the FFIs to have only the channel you care about, but you'll have to do that separately for every star you're interested in so that's just shifting your computation time to before you get to do the fun stuff).