<commit_before>#!perl 
use 5.006;
use strict;
use warnings FATAL => 'all';
use Test::More;

#use Math::Trig qw/atan asin acos/;
use Astro::WCS::PP;

use t::TestHelper;


# how many test we can run depends on wether we have PDL::Slatec installed

my $ntests = 2;
my $slatec = 0;
eval { require PDL; };
unless ($@) {
    # we have PDL; now check for Slatec
    eval { require PDL::Slatec; };
    unless ($@) {
	# we also have PDL::Slatec
	$ntests += 2;
	$slatec = 1;
    }
}

plan tests => $ntests;


diag( "Testing image routines (CD convention)" );

my $hdr = read_hdr('t/sample-CD-header.txt');<commit_msg>give a diagnositc message when 2 tests are skipped because PDL is missing<commit_after>#!perl 
use 5.006;
use strict;
use warnings FATAL => 'all';
use Test::More;

#use Math::Trig qw/atan asin acos/;
use Astro::WCS::PP;

use t::TestHelper;


# how many test we can run depends on wether we have PDL::Slatec installed

my $ntests = 2;
my $slatec = 0;
eval { require PDL; };
unless ($@) {
    # we have PDL; now check for Slatec
    eval { require PDL::Slatec; };
    unless ($@) {
	# we also have PDL::Slatec
	$ntests += 2;
	$slatec = 1;
    } else {
	diag( "Skipping tests on wcs_cd_radec2pix since PDL is missing" );
    }
}

plan tests => $ntests;


diag( "Testing image routines (CD convention)" );

my $hdr = read_hdr('t/sample-CD-header.txt');
{'fraction_non_alphanumeric': 0.14538745387453875, 'fraction_numerical': 0.013284132841328414, 'mean_word_length': 3.6597938144329896, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3987334', 'n_tokens_mistral': 550, 'n_tokens_neox': 520, 'n_words': 169}