Condition Coverage

blib/lib/PDLA/IO/FITS.pm
Criterion Covered Total %
condition 63 233 27.0


and 3 conditions

line !l l&&!r l&&r condition
364 6 1 2 wantarray and not $fh->eof
377 6 3 0 wantarray and not $opt->{'data'}
9 0 0 wantarray and not $opt->{'data'} and @extensions
378 0 0 0 $fh->read($line, 80) and not $line =~ /^XTENSION=/
0 0 0 $fh->read($line, 80) and not $line =~ /^XTENSION=/ and not $fh->eof
387 2 7 0 $nbytes == 0 and not $line =~ /^SIMPLE = +T/
414 3 6 0 not wantarray and $currentext != $extnum
439 9 0 0 $PDLA::Astro_FITS_Header and $opt->{'afh'}
481 0 55 9 defined $name and $name eq 'END'
502 2 6 1 not defined $foo->{'XTENSION'} and $foo->{'NAXIS'} == 0
8 1 0 not defined $foo->{'XTENSION'} and $foo->{'NAXIS'} == 0 and not wantarray
7 0 0 not defined $foo->{'XTENSION'} and $foo->{'NAXIS'} == 0 and not wantarray and not $explicit_extension
558 0 0 1 ref $extensions[0] eq 'HASH' and $extensions[0]{'SIMPLE'}
0 0 1 ref $extensions[0] eq 'HASH' and $extensions[0]{'SIMPLE'} and exists $extensions[0]{'NAXIS'}
0 0 1 ref $extensions[0] eq 'HASH' and $extensions[0]{'SIMPLE'} and exists $extensions[0]{'NAXIS'} and $extensions[0]{'NAXIS'} == 0
636 8 0 12 defined $$foo{"NAXIS$i"} and $i <= $foo->{'NAXIS'}
688 6 2 0 $foo->{'BITPIX'} > 0 and exists $foo->{'BLANK'}
704 4 4 0 $pdl->badflag and $PDLA::verbose
1266 0 0 0 $hdr->{'NAXIS2'} > 0 and $tmpcol->{'rpt'} > 0
1285 0 0 0 $hdr->{'ZIMAGE'} and $hdr->{'ZCMPTYPE'}
0 0 0 $hdr->{'ZIMAGE'} and $hdr->{'ZCMPTYPE'} and $opt->{'expand'}
1526 0 0 0 exists $$hdr{'Z' . $_} and defined $$hdr{'Z' . $_}
1992 8 0 0 $PDLA::Astro_FITS_Header and defined $h
8 0 0 $PDLA::Astro_FITS_Header and defined $h and ref $h eq 'HASH'
0 0 0 $PDLA::Astro_FITS_Header and defined $h and ref $h eq 'HASH' and not defined tied %$h
2022 1 0 0 defined tied %$h and UNIVERSAL::isa(tied %$h, 'Astro::FITS::Header')
7 1 0 defined $h and (defined tied %$h and UNIVERSAL::isa(tied %$h, 'Astro::FITS::Header'))
2057 0 0 0 exists $$h{"NAXIS$k"} && $$h{"NAXIS$k"} != $pdl->dim($k - 1)
2084 0 0 0 defined $index[0] and $kn
2227 4 0 4 $pdl->badflag and $BITPIX < 0
4 0 4 $pdl->badflag and $BITPIX < 0 and $PDLA::Bad::UseNaN == 0
2243 0 0 0 $pdl->badflag and $BITPIX < 0
0 0 0 $pdl->badflag and $BITPIX < 0 and $PDLA::Bad::UseNaN == 0
2253 4 0 4 $pdl->badflag and $BITPIX < 0
4 0 4 $pdl->badflag and $BITPIX < 0 and $PDLA::Bad::UseNaN == 0
2382 0 0 0 !(/^(hdr|tbl)$/ || /^len_/) && defined $hash->{$_}
2397 0 0 0 defined $rows and $rows != 1
2398 0 0 0 $r != $rows and $r != 1
2438 0 0 0 $name ne $key and $PDLA::verbose
2491 0 0 0 $PDLA::debug and $i != $cols
2688 0 0 0 UNIVERSAL::isa($var, 'PDLA') and $var->ndims > 1

or 2 conditions

line l !l condition
914 0 0 $$hdr{"TNULL$i"} || 0
1006 0 0 $$hdr{"TTYPE$i"} || 'COL'
1024 0 0 $tmpcol->{'rpt'} ||= 1
1063 0 0 $hdr->{'NAXIS2'} || 1

or 3 conditions

line l !l&&r !l&&!r condition
89 0 14 0 $ENV{'PDLA_FITS_LEGACY'} or $PDLA::Config{'FITS_LEGACY'}
335 0 0 7 @_ < 1 or @_ > 2
389 0 0 9 $fh->eof or not $ct
444 0 0 0 $fh->eof or $line =~ /^END(\s|\000)/
516 0 1 8 not $opt->{'data'} or $foo->{'NAXIS'} == 0
537 0 0 0 $PDLA::verbose or $PDLA::debug
661 1 0 7 $pdl->get_datatype == $PDLA::IO::FITS::PDLA_L or $pdl->get_datatype == $PDLA::IO::FITS::PDLA_F
662 6 1 1 $pdl->get_datatype == $PDLA::IO::FITS::PDLA_D or $pdl->get_datatype == $PDLA::IO::FITS::PDLA_LL
711 8 0 0 not defined $bscale or $bscale eq ''
712 8 0 0 not defined $bzero or $bzero eq ''
893 0 0 0 length $$hdr{"TSCAL$n"} or length $$hdr{"TZERO$n"}
969 0 0 0 length $$hdr{"TZERO$n"} or length $$hdr{"TSCAL$n"}
1012 0 0 0 defined $tbl->{$name} or $name eq 'COL'
1187 0 0 0 $valid_tzero or $valid_tscal
1533 0 0 0 $k =~ /^Z/ or $k eq 'TFIELDS'
0 0 0 $k =~ /^Z/ or $k eq 'TFIELDS' or $k =~ /^TTYPE/
0 0 0 $k =~ /^Z/ or $k eq 'TFIELDS' or $k =~ /^TTYPE/ or $k =~ /^TFORM/
1820 0 0 9 $hdrk eq 'F' or $hdrk eq 'T'
1861 0 0 7 $#_ < 1 or $#_ > 3
1937 0 0 7 $pdl->get_datatype == $PDLA::IO::FITS::PDLA_S or $pdl->get_datatype == $PDLA::IO::FITS::PDLA_US
1968 0 0 2 $min < $dmin or $max > $dmax
2000 0 0 0 length $k > 8 or not $k =~ /^[A-Z_][A-Z\d\_]*$/i
2170 0 0 8 $bscale != 1 or $bzero != 0
2208 1 0 7 $BITPIX == 32 or $BITPIX == -32
2209 6 1 1 $BITPIX == -64 or $BITPIX == 64
2438 0 0 0 $PDLA::debug or $name ne $key and $PDLA::verbose
2456 0 0 0 $num > $cols or $num < 1
2609 0 0 0 not UNIVERSAL::isa($var, 'PDLA') or $var->ndims != 2
0 0 0 not UNIVERSAL::isa($var, 'PDLA') or $var->ndims != 2 or not UNIVERSAL::isa($lengths, 'PDLA')
0 0 0 not UNIVERSAL::isa($var, 'PDLA') or $var->ndims != 2 or not UNIVERSAL::isa($lengths, 'PDLA') or $lengths->ndims != 1
0 0 0 not UNIVERSAL::isa($var, 'PDLA') or $var->ndims != 2 or not UNIVERSAL::isa($lengths, 'PDLA') or $lengths->ndims != 1 or $lengths->dim(0) != $var->dim(0)
2667 0 0 0 $tmp->get_datatype == $PDLA::IO::FITS::PDLA_L or $tmp->get_datatype == $PDLA::IO::FITS::PDLA_F
2717 0 0 0 $tmp->get_datatype == $PDLA::IO::FITS::PDLA_L or $tmp->get_datatype == $PDLA::IO::FITS::PDLA_F
2819 0 0 0 defined $newhdr{$field} or $field =~ /^end|simple|xtension$/i