IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 12, 2023, 9:21:20 AM (3 years ago)
Author:
eugene
Message:

changing directory structure to place nights in years

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/eam/rawfix.20230221/src/update_chip_stats.pl

    r42449 r42462  
    1313
    1414# USAGE: update_chip_locations.pl --dateobs (night) --stage (0,1,etc) --chiplist (file)
    15 
    16 my ($fulldate, $dateword, $chiplist, $stage, $topdir) = &parse_cmdopts;
     15# nebulous.config & chiplist.txt are at topdir
     16
     17my ($fulldate, $dateword, $chiplist, $stage, $topdir, $basedir) = &parse_cmdopts;
    1718my ($raw_dbh) = &parse_db_config ("$topdir/nebulous.config");
    1819
     
    3839foreach my $chip_id (@chip_ids) {
    3940
    40     open (STATFILE, "$topdir/$dateword/$chip_id.stats.$stage.txt");
     41    open (STATFILE, "$basedir/$dateword/$chip_id.stats.$stage.txt");
    4142    my @lines = <STATFILE>;
    4243    close (STATFILE);
     
    154155    my $dateword = sprintf ("%4d%02d%02d", $date_year, $date_month, $date_day);
    155156
    156     return ($fulldate, $dateword, $chiplist, $stage, $topdir);
     157    my ($yearobs) = substr ($dateword, 0, 4);
     158    my $basedir = "$topdir/$yearobs";
     159
     160    return ($fulldate, $dateword, $chiplist, $stage, $topdir, $basedir);
    157161}
    158162
Note: See TracChangeset for help on using the changeset viewer.