Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Starlink/perl-Astro-FITS-HdrTrans
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: lucarizzi/perl-Astro-FITS-HdrTrans
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Apr 1, 2011

  1. Add support for frequency switch observations

    Luca Rizzi committed Apr 1, 2011
    Copy the full SHA
    694e102 View commit details
Showing with 23 additions and 3 deletions.
  1. +23 −3 lib/Astro/FITS/HdrTrans/ACSIS.pm
26 changes: 23 additions & 3 deletions lib/Astro/FITS/HdrTrans/ACSIS.pm
Original file line number Diff line number Diff line change
@@ -140,6 +140,7 @@ sub to_DR_RECIPE {
my $pol = $class->to_POLARIMETER( $FITS_headers );
my $standard = $class->to_STANDARD( $FITS_headers );
my $utdate = $class->to_UTDATE( $FITS_headers );
my $freq_sw = $class->_is_FSW( $FITS_headers );

if ($utdate < 20080701) {
if ($obstype eq 'skydip' && $dr eq 'REDUCE_SCIENCE') {
@@ -157,9 +158,9 @@ sub to_DR_RECIPE {
if ( $utdate > 20081115 && $pol && $is_sci ) {
$dr .= "_POL" unless $dr =~ /_POL$/;
}

if( uc( $dr ) eq 'REDUCE_SCIENCE' ) {
$dr = 'REDUCE_SCIENCE_GRADIENT';
$dr = uc($dr);
if( $dr eq 'REDUCE_SCIENCE' ) {
$dr .= '_' . ($freq_sw ? 'FSW' : 'GRADIENT');
}

return $dr;
@@ -623,6 +624,25 @@ sub to_SUBSYSTEM_IDKEY {
}


=item B<_is_FSW>
Helper function to determine if we are doing frequency switch.
=cut

sub _is_FSW {
my $class = shift;
my $FITS_headers = shift;

my $fsw = $FITS_headers->{SW_MODE};

if ( defined( $fsw ) &&
$fsw =~ /freqsw/i ) {
return 1;
}
return 0;
}

=back