#!/usr/bin/env perl
#
# file to queue chipRuns for the MD06 exposures from April 1 - June 25 2009
# md08 fields
my @dates = qw(
2009-04-19     
2009-04-20     
2009-04-21     
2009-04-26     
2009-04-27     
2009-04-30     
2009-05-01     
2009-05-02     
2009-05-05     
2009-05-29     
2009-06-02     
2009-06-03     
2009-06-04     
2009-06-05     
2009-06-07     
2009-06-08     
2009-06-09     
2009-06-11     
2009-06-12     
2009-06-13     
2009-06-14     
2009-06-17     
2009-06-18     
2009-06-19     
2009-06-20     
2009-06-22     
);

my $field = 'MD06';

foreach my $date (@dates) {

    my $tag = $date;
    $tag =~ s/\-//g;

    my $block = substr($date, 0, 7);
    $block =~ s/\-//g;
    $label = "$field.$block.v0";

    my $command = "chiptool -pretend -dbname gpc1 -definebyquery -set_label $label -dateobs_begin ${date}T00:00:00 -dateobs_end ${date}T23:59:59 -comment \'$field%\' -set_workdir neb://\@HOST\@.0/gpc1/$tag.stdsci.v0 -set_end_stage warp -set_tess_id $field -set_reduction STDSCIENCE_V0";

    print "$command\n";
}

