noraeisner / LATTE

Lightcurve Analysis Tool for Transiting Exoplanet
GNU Lesser General Public License v3.0
39 stars 10 forks source link

[LATTE-dev] batch mode seems to incorrectly believe there are existing files and skip #23

Closed orionlee closed 3 years ago

orionlee commented 3 years ago

In LATTE-dev branch, when running in batch mode, it seems to incorrectly believe there are existing files and skip.

The workflow:

  1. Create a csv file for TIC 149601126
  2. Run LATTE against it. It ran successfully
  3. Rename the output directory from 149601126 to 149601126_trial1
  4. Tweak the parameters in the csv and run LATTE again.
  5. For the second run, LATTE complained "This file already exists", even though I renamed the output directory in step 3.

    $python -m LATTE --targetlist=dataLATTE/input149601126_sector27-8-only.csv
    Downloading https://hpiers.obspm.fr/iers/bul/bulc/Leap_Second.dat
    |===========================================| 1.3k/1.3k (100.00%)         0s
    This file already exists therefore SKIP. To overwrite files run this code with --o in the command line.
    
    Complete!

    The workaround: specify --o

Version: It happened in current LATTE-dev branch. I did recall encountering such issue with v1.0.0 but am not 100% sure.

orionlee commented 3 years ago

I checked the codes, it looks like an existing behavior since v1.0.0. As it is, LATTE would skip a tic if the data directory contains any file / directory that contains the TIC: it checks for *<tic>*.

E.g., in my setup, LATTE skips it because

  1. I rename the existing output directory to <tic>_something_extra but it still contains the TIC
  2. I keep the input csv with in the data directory. it has the TIC in the filename.
    ['./dataLATTE\\149601126_sector27-8', './dataLATTE\\input149601126_sector27-8-only.csv']

Is there some reason it needs to check against *<tic>* rather than just the <tic>?

Relevant codes: https://github.com/noraeisner/LATTE/blob/5eea005668f67b1e98e554c557119508c8e92805/LATTE/__main__.py#L583-L586

noraeisner commented 3 years ago

Good point! The code has been changed so that it only searches for the tic id and not alternative names.