From e476e835c13a02d61fc4593777e52fc6a2261509 Mon Sep 17 00:00:00 2001 From: Tim Lister Date: Fri, 3 Apr 2015 22:43:57 +0000 Subject: [PATCH 1/2] Fix incorrect use of string literals in use of _SET_FILE_FITS_ITEM_ --- .../imaging/LCOFLI/_MAKE_DARK_FROM_GROUP_ | 10 ++++++---- src/primitives/imaging/LCOSBIG/_DERIVED_PRODUCTS_ | 13 ++++++------- .../imaging/LCOSBIG/_MAKE_BIAS_FROM_GROUP_ | 10 ++++++---- .../imaging/LCOSBIG/_MAKE_DARK_FROM_GROUP_ | 10 ++++++---- .../imaging/LCOSBIG/_MAKE_FLAT_FROM_GROUP_ | 6 ++++-- .../imaging/LCOSINISTRO/_DERIVED_PRODUCTS_ | 9 +++------ .../imaging/LCOSINISTRO/_MAKE_BIAS_FROM_GROUP_ | 6 ++++-- .../imaging/LCOSINISTRO/_MAKE_DARK_FROM_GROUP_ | 10 ++++++---- .../imaging/LCOSINISTRO/_MAKE_FLAT_FROM_GROUP_ | 6 ++++-- .../imaging/LCOSPECTRAL/_MAKE_BIAS_FROM_GROUP_ | 10 ++++++---- .../imaging/LCOSPECTRAL/_MAKE_FLAT_FROM_GROUP_ | 6 ++++-- 11 files changed, 55 insertions(+), 41 deletions(-) diff --git a/src/primitives/imaging/LCOFLI/_MAKE_DARK_FROM_GROUP_ b/src/primitives/imaging/LCOFLI/_MAKE_DARK_FROM_GROUP_ index 2fc0c8700..04c29bfcd 100644 --- a/src/primitives/imaging/LCOFLI/_MAKE_DARK_FROM_GROUP_ +++ b/src/primitives/imaging/LCOFLI/_MAKE_DARK_FROM_GROUP_ @@ -42,7 +42,7 @@ # TAL: Tim Lister (LCOGT) # # Copyright: -# Copyright (C) 2012 Las Cumbres Observatory Global Telescope Inc. +# Copyright (C) 2012, 2015 Las Cumbres Observatory Global Telescope Inc. # All Rights Reserved. # #- @@ -271,13 +271,15 @@ use File::Copy; _SET_FILE_FITS_ITEM_ FILE=$file KEY=L1QIMGST VALUE=$img_status, COMMENT=Image|taking|status|(bitmask;-1=Unknown,0=OK) # Set public/private flag and release date - _SET_FILE_FITS_ITEM_ FILE=$file KEY=L1PUBPRV VALUE='public' COMMENT=Public|or|private|data? + my $pubpriv = 'public'; + _SET_FILE_FITS_ITEM_ FILE=$file KEY=L1PUBPRV VALUE=$pubpriv COMMENT=Public|or|private|data? my $pubdate = $Frm->hdr( "ORACDATETIME"); # orac_print "$pubdate\n"; _SET_FILE_FITS_ITEM_ FILE=$file KEY=L1PUBDAT VALUE=$pubdate COMMENT=[UTC]|Date|the|frame|becomes|public - _SET_FILE_FITS_ITEM_ FILE=$file KEY=ENGSTATE VALUE='OPERATIONAL' + my $engstate = 'OPERATIONAL'; + _SET_FILE_FITS_ITEM_ FILE=$file KEY=ENGSTATE VALUE=$engstate # Set recipe used my $recipe = $Frm->recipe; @@ -363,7 +365,7 @@ Tim Lister (tlister@lcogt.net) =head1 COPYRIGHT -Copyright (C) 2012 Las Cumbres Observatory Global Telescope Inc. +Copyright (C) 2012, 2015 Las Cumbres Observatory Global Telescope Inc. All Rights Reserved. =cut diff --git a/src/primitives/imaging/LCOSBIG/_DERIVED_PRODUCTS_ b/src/primitives/imaging/LCOSBIG/_DERIVED_PRODUCTS_ index 943eb5660..c5cd783a4 100644 --- a/src/primitives/imaging/LCOSBIG/_DERIVED_PRODUCTS_ +++ b/src/primitives/imaging/LCOSBIG/_DERIVED_PRODUCTS_ @@ -200,7 +200,8 @@ use ORAC::Version; my $x2 = $Frm->uhdr( "ORAC_X_UPPER_BOUND" ); my $y1 = $Frm->uhdr( "ORAC_Y_LOWER_BOUND" ); my $y2 = $Frm->uhdr( "ORAC_Y_UPPER_BOUND" ); - my $trimsec = '\'[' . $x1 . ':' . $x2 . ',' . $y1 . ':' . $y2 . ']\''; +# my $trimsec = '\'[' . $x1 . ':' . $x2 . ',' . $y1 . ':' . $y2 . ']\''; + my $trimsec = '[' . $x1 . ':' . $x2 . ',' . $y1 . ':' . $y2 . ']'; # print "DBG: TRIMSEC=$trimsec\n"; _SET_FILE_FITS_ITEM_ FILE=$file KEY=TRIMSEC VALUE=$trimsec, STRING=True @@ -348,14 +349,12 @@ use ORAC::Version; _SET_FILE_FITS_ITEM_ FILE=$file KEY=L1PUBDAT VALUE=$pubdate COMMENT=[UTC]|Date|the|frame|becomes|public my $siteid = $Frm->hdr( "SITEID"); - + my $engstate = 'COMMISSIONING'; if ( $siteid ne "bpl" ) { - orac_print "SiteID=$siteid, setting to OPERATIONAL\n"; - _SET_FILE_FITS_ITEM_ FILE=$file KEY=ENGSTATE VALUE='OPERATIONAL' - } else { - orac_print "SiteID=$siteid, setting to COMMISSIONING\n"; - _SET_FILE_FITS_ITEM_ FILE=$file KEY=ENGSTATE VALUE='COMMISSIONING' + $engstate = 'OPERATIONAL'; } + orac_print "SiteID=$siteid, setting to $engstate\n"; + _SET_FILE_FITS_ITEM_ FILE=$file KEY=ENGSTATE VALUE=$engstate # Set recipes used diff --git a/src/primitives/imaging/LCOSBIG/_MAKE_BIAS_FROM_GROUP_ b/src/primitives/imaging/LCOSBIG/_MAKE_BIAS_FROM_GROUP_ index 20f577c61..5cc45fffa 100644 --- a/src/primitives/imaging/LCOSBIG/_MAKE_BIAS_FROM_GROUP_ +++ b/src/primitives/imaging/LCOSBIG/_MAKE_BIAS_FROM_GROUP_ @@ -42,7 +42,7 @@ # TAL: Tim Lister (LCOGT) # # Copyright: -# Copyright (C) 2012 Las Cumbres Observatory Global Telescope Inc. +# Copyright (C) 2012, 2015 Las Cumbres Observatory Global Telescope Inc. # All Rights Reserved. # #- @@ -248,13 +248,15 @@ use File::Copy; _SET_FILE_FITS_ITEM_ FILE=$file KEY=L1QIMGST VALUE=$img_status, COMMENT=Image|taking|status|(bitmask;-1=Unknown,0=OK) # Set public/private flag and release date - _SET_FILE_FITS_ITEM_ FILE=$file KEY=L1PUBPRV VALUE='public' COMMENT=Public|or|private|data? + my $pubpriv = 'public'; + _SET_FILE_FITS_ITEM_ FILE=$file KEY=L1PUBPRV VALUE=$pubpriv COMMENT=Public|or|private|data? my $pubdate = $Frm->hdr( "ORACDATETIME"); # orac_print "$pubdate\n"; _SET_FILE_FITS_ITEM_ FILE=$file KEY=L1PUBDAT VALUE=$pubdate COMMENT=[UTC]|Date|the|frame|becomes|public - _SET_FILE_FITS_ITEM_ FILE=$file KEY=ENGSTATE VALUE='OPERATIONAL' + my $engstate = 'OPERATIONAL'; + _SET_FILE_FITS_ITEM_ FILE=$file KEY=ENGSTATE VALUE=$engstate # Set recipe used my $recipe = $Frm->recipe; @@ -359,7 +361,7 @@ Tim Lister (tlister@lcogt.net) =head1 COPYRIGHT -Copyright (C) 2012 Las Cumbres Observatory Global Telescope Inc. +Copyright (C) 2012, 2015 Las Cumbres Observatory Global Telescope Inc. All Rights Reserved. =cut diff --git a/src/primitives/imaging/LCOSBIG/_MAKE_DARK_FROM_GROUP_ b/src/primitives/imaging/LCOSBIG/_MAKE_DARK_FROM_GROUP_ index b0ef3e4d1..287f33d13 100644 --- a/src/primitives/imaging/LCOSBIG/_MAKE_DARK_FROM_GROUP_ +++ b/src/primitives/imaging/LCOSBIG/_MAKE_DARK_FROM_GROUP_ @@ -42,7 +42,7 @@ # TAL: Tim Lister (LCOGT) # # Copyright: -# Copyright (C) 2012 Las Cumbres Observatory Global Telescope Inc. +# Copyright (C) 2012, 2015 Las Cumbres Observatory Global Telescope Inc. # All Rights Reserved. # #- @@ -271,13 +271,15 @@ use File::Copy; _SET_FILE_FITS_ITEM_ FILE=$file KEY=L1QIMGST VALUE=$img_status, COMMENT=Image|taking|status|(bitmask;-1=Unknown,0=OK) # Set public/private flag and release date - _SET_FILE_FITS_ITEM_ FILE=$file KEY=L1PUBPRV VALUE='public' COMMENT=Public|or|private|data? + my $pubpriv = 'public'; + _SET_FILE_FITS_ITEM_ FILE=$file KEY=L1PUBPRV VALUE=$pubpriv COMMENT=Public|or|private|data? my $pubdate = $Frm->hdr( "ORACDATETIME"); # orac_print "$pubdate\n"; _SET_FILE_FITS_ITEM_ FILE=$file KEY=L1PUBDAT VALUE=$pubdate COMMENT=[UTC]|Date|the|frame|becomes|public - _SET_FILE_FITS_ITEM_ FILE=$file KEY=ENGSTATE VALUE='OPERATIONAL' + my $engstate = 'OPERATIONAL'; + _SET_FILE_FITS_ITEM_ FILE=$file KEY=ENGSTATE VALUE=$engstate # Set recipe used my $recipe = $Frm->recipe; @@ -385,7 +387,7 @@ Tim Lister (tlister@lcogt.net) =head1 COPYRIGHT -Copyright (C) 2012 Las Cumbres Observatory Global Telescope Inc. +Copyright (C) 2012, 2015 Las Cumbres Observatory Global Telescope Inc. All Rights Reserved. =cut diff --git a/src/primitives/imaging/LCOSBIG/_MAKE_FLAT_FROM_GROUP_ b/src/primitives/imaging/LCOSBIG/_MAKE_FLAT_FROM_GROUP_ index f4aa7c06a..9ab70da56 100644 --- a/src/primitives/imaging/LCOSBIG/_MAKE_FLAT_FROM_GROUP_ +++ b/src/primitives/imaging/LCOSBIG/_MAKE_FLAT_FROM_GROUP_ @@ -397,13 +397,15 @@ use File::Copy; _SET_FILE_FITS_ITEM_ FILE=$file KEY=L1QIMGST VALUE=$img_status, COMMENT=Image|taking|status|(bitmask;-1=Unknown,0=OK) # Set public/private flag and release date - _SET_FILE_FITS_ITEM_ FILE=$file KEY=L1PUBPRV VALUE='public' COMMENT=Public|or|private|data? + my $pubpriv = 'public'; + _SET_FILE_FITS_ITEM_ FILE=$file KEY=L1PUBPRV VALUE=$pubpriv COMMENT=Public|or|private|data? my $pubdate = $Frm->hdr( "ORACDATETIME"); # orac_print "$frmdate $pubdate\n"; _SET_FILE_FITS_ITEM_ FILE=$file KEY=L1PUBDAT VALUE=$pubdate COMMENT=[UTC]|Date|the|frame|becomes|public - _SET_FILE_FITS_ITEM_ FILE=$file KEY=ENGSTATE VALUE='OPERATIONAL' + my $engstate = 'OPERATIONAL'; + _SET_FILE_FITS_ITEM_ FILE=$file KEY=ENGSTATE VALUE=$engstate # Set recipe used my $recipe = $Frm->recipe; diff --git a/src/primitives/imaging/LCOSINISTRO/_DERIVED_PRODUCTS_ b/src/primitives/imaging/LCOSINISTRO/_DERIVED_PRODUCTS_ index 19e724214..d9fbf02c3 100644 --- a/src/primitives/imaging/LCOSINISTRO/_DERIVED_PRODUCTS_ +++ b/src/primitives/imaging/LCOSINISTRO/_DERIVED_PRODUCTS_ @@ -340,14 +340,11 @@ use ORAC::Version; _SET_FILE_FITS_ITEM_ FILE=$file KEY=L1PUBDAT VALUE=$pubdate COMMENT=[UTC]|Date|the|frame|becomes|public my $siteid = $Frm->hdr( "SITEID"); - if ( $siteid ne "bpl" ) { - orac_print "SiteID=$siteid, setting to OPERATIONAL\n"; - _SET_FILE_FITS_ITEM_ FILE=$file KEY=ENGSTATE VALUE='OPERATIONAL' - } else { - orac_print "SiteID=$siteid, setting to COMMISSIONING\n"; - _SET_FILE_FITS_ITEM_ FILE=$file KEY=ENGSTATE VALUE='COMMISSIONING' + $engstate = 'OPERATIONAL'; } + orac_print "SiteID=$siteid, setting to $engstate\n"; + _SET_FILE_FITS_ITEM_ FILE=$file KEY=ENGSTATE VALUE=$engstate # Set recipes used diff --git a/src/primitives/imaging/LCOSINISTRO/_MAKE_BIAS_FROM_GROUP_ b/src/primitives/imaging/LCOSINISTRO/_MAKE_BIAS_FROM_GROUP_ index 1477606df..837f36f03 100644 --- a/src/primitives/imaging/LCOSINISTRO/_MAKE_BIAS_FROM_GROUP_ +++ b/src/primitives/imaging/LCOSINISTRO/_MAKE_BIAS_FROM_GROUP_ @@ -249,13 +249,15 @@ use File::Copy; _SET_FILE_FITS_ITEM_ FILE=$file KEY=L1QIMGST VALUE=$img_status, COMMENT=Image|taking|status|(bitmask;-1=Unknown,0=OK) # Set public/private flag and release date - _SET_FILE_FITS_ITEM_ FILE=$file KEY=L1PUBPRV VALUE='public' COMMENT=Public|or|private|data? + my $pubpriv = 'public'; + _SET_FILE_FITS_ITEM_ FILE=$file KEY=L1PUBPRV VALUE=$pubpriv COMMENT=Public|or|private|data? my $pubdate = $Frm->hdr( "ORACDATETIME"); # orac_print "$pubdate\n"; _SET_FILE_FITS_ITEM_ FILE=$file KEY=L1PUBDAT VALUE=$pubdate COMMENT=[UTC]|Date|the|frame|becomes|public - _SET_FILE_FITS_ITEM_ FILE=$file KEY=ENGSTATE VALUE='OPERATIONAL' + my $engstate = 'OPERATIONAL'; + _SET_FILE_FITS_ITEM_ FILE=$file KEY=ENGSTATE VALUE=$engstate # Set recipe used my $recipe = $Frm->recipe; diff --git a/src/primitives/imaging/LCOSINISTRO/_MAKE_DARK_FROM_GROUP_ b/src/primitives/imaging/LCOSINISTRO/_MAKE_DARK_FROM_GROUP_ index b7c40b723..29725e8b8 100644 --- a/src/primitives/imaging/LCOSINISTRO/_MAKE_DARK_FROM_GROUP_ +++ b/src/primitives/imaging/LCOSINISTRO/_MAKE_DARK_FROM_GROUP_ @@ -42,7 +42,7 @@ # TAL: Tim Lister (LCOGT) # # Copyright: -# Copyright (C) 2012 Las Cumbres Observatory Global Telescope Inc. +# Copyright (C) 2012, 2015 Las Cumbres Observatory Global Telescope Inc. # All Rights Reserved. # #- @@ -271,13 +271,15 @@ use File::Copy; _SET_FILE_FITS_ITEM_ FILE=$file KEY=L1QIMGST VALUE=$img_status, COMMENT=Image|taking|status|(bitmask;-1=Unknown,0=OK) # Set public/private flag and release date - _SET_FILE_FITS_ITEM_ FILE=$file KEY=L1PUBPRV VALUE='public' COMMENT=Public|or|private|data? + my $pubpriv = 'public'; + _SET_FILE_FITS_ITEM_ FILE=$file KEY=L1PUBPRV VALUE=$pubpriv COMMENT=Public|or|private|data? my $pubdate = $Frm->hdr( "ORACDATETIME"); # orac_print "$pubdate\n"; _SET_FILE_FITS_ITEM_ FILE=$file KEY=L1PUBDAT VALUE=$pubdate COMMENT=[UTC]|Date|the|frame|becomes|public - _SET_FILE_FITS_ITEM_ FILE=$file KEY=ENGSTATE VALUE='OPERATIONAL' + my $engstate = 'OPERATIONAL'; + _SET_FILE_FITS_ITEM_ FILE=$file KEY=ENGSTATE VALUE=$engstate # Set recipe used my $recipe = $Frm->recipe; @@ -386,7 +388,7 @@ Tim Lister (tlister@lcogt.net) =head1 COPYRIGHT -Copyright (C) 2012 Las Cumbres Observatory Global Telescope Inc. +Copyright (C) 2012, 2015 Las Cumbres Observatory Global Telescope Inc. All Rights Reserved. =cut diff --git a/src/primitives/imaging/LCOSINISTRO/_MAKE_FLAT_FROM_GROUP_ b/src/primitives/imaging/LCOSINISTRO/_MAKE_FLAT_FROM_GROUP_ index c49925285..ba74f76a8 100644 --- a/src/primitives/imaging/LCOSINISTRO/_MAKE_FLAT_FROM_GROUP_ +++ b/src/primitives/imaging/LCOSINISTRO/_MAKE_FLAT_FROM_GROUP_ @@ -400,13 +400,15 @@ use File::Copy; _SET_FILE_FITS_ITEM_ FILE=$file KEY=L1QIMGST VALUE=$img_status, COMMENT=Image|taking|status|(bitmask;-1=Unknown,0=OK) # Set public/private flag and release date - _SET_FILE_FITS_ITEM_ FILE=$file KEY=L1PUBPRV VALUE='public' COMMENT=Public|or|private|data? + my $pubpriv = 'public'; + _SET_FILE_FITS_ITEM_ FILE=$file KEY=L1PUBPRV VALUE=$pubpriv COMMENT=Public|or|private|data? my $pubdate = $Frm->hdr( "ORACDATETIME"); # orac_print "$frmdate $pubdate\n"; _SET_FILE_FITS_ITEM_ FILE=$file KEY=L1PUBDAT VALUE=$pubdate COMMENT=[UTC]|Date|the|frame|becomes|public - _SET_FILE_FITS_ITEM_ FILE=$file KEY=ENGSTATE VALUE='OPERATIONAL' + my $engstate = 'OPERATIONAL'; + _SET_FILE_FITS_ITEM_ FILE=$file KEY=ENGSTATE VALUE=$engstate # Set recipe used my $recipe = $Frm->recipe; diff --git a/src/primitives/imaging/LCOSPECTRAL/_MAKE_BIAS_FROM_GROUP_ b/src/primitives/imaging/LCOSPECTRAL/_MAKE_BIAS_FROM_GROUP_ index 6f2b2f4e6..641655a8f 100644 --- a/src/primitives/imaging/LCOSPECTRAL/_MAKE_BIAS_FROM_GROUP_ +++ b/src/primitives/imaging/LCOSPECTRAL/_MAKE_BIAS_FROM_GROUP_ @@ -44,7 +44,7 @@ # TAL: Tim Lister (LCOGT) # # Copyright: -# Copyright (C) 2012-2014 Las Cumbres Observatory Global Telescope Inc. +# Copyright (C) 2012-2015 Las Cumbres Observatory Global Telescope Inc. # All Rights Reserved. # #- @@ -275,13 +275,15 @@ use File::Copy; _SET_FILE_FITS_ITEM_ FILE=$file KEY=L1QIMGST VALUE=$img_status, COMMENT=Image|taking|status|(bitmask;-1=Unknown,0=OK) # Set public/private flag and release date - _SET_FILE_FITS_ITEM_ FILE=$file KEY=L1PUBPRV VALUE='public' COMMENT=Public|or|private|data? + my $pubpriv = 'public'; + _SET_FILE_FITS_ITEM_ FILE=$file KEY=L1PUBPRV VALUE=$pubpriv COMMENT=Public|or|private|data? my $pubdate = $Frm->hdr( "ORACDATETIME"); # orac_print "$pubdate\n"; _SET_FILE_FITS_ITEM_ FILE=$file KEY=L1PUBDAT VALUE=$pubdate COMMENT=[UTC]|Date|the|frame|becomes|public - _SET_FILE_FITS_ITEM_ FILE=$file KEY=ENGSTATE VALUE='OPERATIONAL' + my $engstate = 'OPERATIONAL'; + _SET_FILE_FITS_ITEM_ FILE=$file KEY=ENGSTATE VALUE=$engstate # Set recipe used my $recipe = $Frm->recipe; @@ -394,7 +396,7 @@ Tim Lister (tlister@lcogt.net) =head1 COPYRIGHT -Copyright (C) 2012-2014 Las Cumbres Observatory Global Telescope Inc. +Copyright (C) 2012-2015 Las Cumbres Observatory Global Telescope Inc. All Rights Reserved. =cut diff --git a/src/primitives/imaging/LCOSPECTRAL/_MAKE_FLAT_FROM_GROUP_ b/src/primitives/imaging/LCOSPECTRAL/_MAKE_FLAT_FROM_GROUP_ index 795a0c71b..a8b4b01c2 100644 --- a/src/primitives/imaging/LCOSPECTRAL/_MAKE_FLAT_FROM_GROUP_ +++ b/src/primitives/imaging/LCOSPECTRAL/_MAKE_FLAT_FROM_GROUP_ @@ -348,13 +348,15 @@ use File::Copy; _SET_FILE_FITS_ITEM_ FILE=$file KEY=L1QIMGST VALUE=$img_status, COMMENT=Image|taking|status|(bitmask;-1=Unknown,0=OK) # Set public/private flag and release date - _SET_FILE_FITS_ITEM_ FILE=$file KEY=L1PUBPRV VALUE='public' COMMENT=Public|or|private|data? + my $pubpriv = 'public'; + _SET_FILE_FITS_ITEM_ FILE=$file KEY=L1PUBPRV VALUE=$pubpriv COMMENT=Public|or|private|data? my $pubdate = $Frm->hdr( "ORACDATETIME"); # orac_print "$frmdate $pubdate\n"; _SET_FILE_FITS_ITEM_ FILE=$file KEY=L1PUBDAT VALUE=$pubdate COMMENT=[UTC]|Date|the|frame|becomes|public - _SET_FILE_FITS_ITEM_ FILE=$file KEY=ENGSTATE VALUE='OPERATIONAL' + my $engstate = 'OPERATIONAL'; + _SET_FILE_FITS_ITEM_ FILE=$file KEY=ENGSTATE VALUE=$engstate # Set recipe used my $recipe = $Frm->recipe; From ade1435525970e707a42192a71828b90745b1555 Mon Sep 17 00:00:00 2001 From: Tim Lister Date: Fri, 3 Apr 2015 22:44:43 +0000 Subject: [PATCH 2/2] Fix a missing '=cut' at end of _IMBOX_STATS_ --- src/primitives/imaging/LCOSBIG/_IMBOX_STATS_ | 1 + 1 file changed, 1 insertion(+) diff --git a/src/primitives/imaging/LCOSBIG/_IMBOX_STATS_ b/src/primitives/imaging/LCOSBIG/_IMBOX_STATS_ index 5a7fdf198..b6c1f5670 100644 --- a/src/primitives/imaging/LCOSBIG/_IMBOX_STATS_ +++ b/src/primitives/imaging/LCOSBIG/_IMBOX_STATS_ @@ -139,3 +139,4 @@ TAL: Tim Lister (LCOGT) Copyright (C) 2012-2015 Las Cumbres Observatory Global Telescope Inc. All Rights Reserved. +=cut