Skip to content

Commit c02f101

Browse files
committed
gsl_sf_bessel_In lives in PDL::GSL::SF now
1 parent 4afb18f commit c02f101

6 files changed

Lines changed: 19 additions & 16 deletions

File tree

.github/workflows/test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,10 @@ jobs:
8585
run: cpanm -n PDL::LinearAlgebra::Special
8686

8787
- if: ${{ matrix.kaiser }}
88-
run: cpanm -n PDL::GSLSF::BESSEL
88+
name: Install GSL
89+
uses: PDLPorters/devops/github-actions/install-dep-gsl@master
90+
- if: ${{ matrix.kaiser }}
91+
run: cpanm -n PDL::GSL::SF || ( cat ~/.cpanm/build.log && false )
8992

9093
- run: perl Makefile.PL
9194

META.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
},
4242
"runtime" : {
4343
"recommends" : {
44-
"PDL::GSLSF::BESSEL" : "0",
44+
"PDL::GSL::SF" : "0",
4545
"PDL::Graphics::Simple" : "0",
4646
"PDL::LinearAlgebra::Special" : "0"
4747
},

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ and software, some functions referred to by several different names, and some
4141
names refer to several different functions. As a result, the choice of window
4242
names is somewhat arbitrary.
4343

44-
The ["kaiser($N,$beta)"](#kaiser-n-beta) window function requires [PDL::GSLSF::BESSEL](https://metacpan.org/pod/PDL%3A%3AGSLSF%3A%3ABESSEL). The
44+
The ["kaiser($N,$beta)"](#kaiser-n-beta) window function requires [PDL::GSL::SF](https://metacpan.org/pod/PDL%3A%3AGSL%3A%3ASF). The
4545
["dpss($N,$beta)"](#dpss-n-beta) window function requires [PDL::LinearAlgebra](https://metacpan.org/pod/PDL%3A%3ALinearAlgebra). But the
4646
remaining window functions may be used if these modules are not installed.
4747

cpanfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
requires 'PDL' => '2.055';
22

33
recommends 'PDL::LinearAlgebra::Special';
4-
recommends 'PDL::GSLSF::BESSEL';
4+
recommends 'PDL::GSL::SF';
55
recommends 'PDL::Graphics::Simple';
66

77
on test => sub {

lib/PDL/DSP/Windows.pm

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ and software, some functions referred to by several different names, and some
224224
names refer to several different functions. As a result, the choice of window
225225
names is somewhat arbitrary.
226226
227-
The L</kaiser($N,$beta)> window function requires L<PDL::GSLSF::BESSEL>. The
227+
The L</kaiser($N,$beta)> window function requires L<PDL::GSL::SF>. The
228228
L</dpss($N,$beta)> window function requires L<PDL::LinearAlgebra>. But the
229229
remaining window functions may be used if these modules are not installed.
230230
@@ -1304,31 +1304,31 @@ sub hann_poisson_per {
13041304
}
13051305

13061306
sub kaiser {
1307-
PDL::Core::barf 'kaiser: PDL::GSLSF not installed' unless eval { require PDL::GSLSF::BESSEL };
1307+
PDL::Core::barf 'kaiser: PDL::GSL::SF not installed' unless eval { require PDL::GSL::SF };
13081308
PDL::Core::barf 'kaiser: 2 arguments expected. Got ' . scalar(@_) . ' arguments.' unless @_ == 2;
13091309
my ( $N, $beta ) = @_;
13101310

13111311
$beta *= PI;
13121312

1313-
my ($n) = PDL::GSLSF::BESSEL::gsl_sf_bessel_In(
1313+
my ($n) = PDL::GSL::SF::gsl_sf_bessel_In(
13141314
$beta * sqrt( 1 - PDL::Core::zeroes($N)->xlinvals( -1, 1 ) ** 2 ), 0 );
13151315

1316-
my ($d) = PDL::GSLSF::BESSEL::gsl_sf_bessel_In( $beta, 0 );
1316+
my ($d) = PDL::GSL::SF::gsl_sf_bessel_In( $beta, 0 );
13171317

13181318
$n / $d;
13191319
}
13201320

13211321
sub kaiser_per {
1322-
PDL::Core::barf 'kaiser: PDL::GSLSF not installed' unless eval { require PDL::GSLSF::BESSEL };
1322+
PDL::Core::barf 'kaiser: PDL::GSL::SF not installed' unless eval { require PDL::GSL::SF };
13231323
PDL::Core::barf 'kaiser: 2 arguments expected. Got ' . scalar(@_) . ' arguments.' unless @_ == 2;
13241324
my ($N,$beta) = @_;
13251325

13261326
$beta *= PI;
13271327

1328-
my ($n) = PDL::GSLSF::BESSEL::gsl_sf_bessel_In(
1328+
my ($n) = PDL::GSL::SF::gsl_sf_bessel_In(
13291329
$beta * sqrt( 1 - PDL::Core::zeroes($N)->xlinvals( -1, ( -1 + 1 * ( $N - 1 ) ) / $N ) ** 2 ), 0);
13301330

1331-
my ($d) = PDL::GSLSF::BESSEL::gsl_sf_bessel_In( $beta, 0 );
1331+
my ($d) = PDL::GSL::SF::gsl_sf_bessel_In( $beta, 0 );
13321332

13331333
$n / $d;
13341334
}

t/windows.t

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use PDL;
77
use PDL::DSP::Windows qw( window chebpoly ) ;
88

99
my $HAVE_LinearAlgebra = eval { require PDL::LinearAlgebra::Special };
10-
my $HAVE_BESSEL = eval { require PDL::GSLSF::BESSEL };
10+
my $HAVE_BESSEL = eval { require PDL::GSL::SF };
1111

1212
use lib 't/lib';
1313
use MyTest::Helper qw( dies is_approx );
@@ -67,7 +67,7 @@ subtest 'explict values of windows.' => sub {
6767
6;
6868

6969
SKIP: {
70-
skip 'PDL::GSLSF::BESSEL not installed', 1 unless $HAVE_BESSEL;
70+
skip 'PDL::GSL::SF not installed', 1 unless $HAVE_BESSEL;
7171
is_approx
7272
window( 6, 'kaiser', 0.5 / 3.1415926 ),
7373
[ 0.94030619, 0.97829624, 0.9975765, 0.9975765, 0.97829624, 0.94030619 ],
@@ -151,7 +151,7 @@ subtest 'enbw of windows.' => sub {
151151
}
152152

153153
SKIP: {
154-
skip 'PDL::GSLSF::BESSEL not installed', 1 unless $HAVE_BESSEL;
154+
skip 'PDL::GSL::SF not installed', 1 unless $HAVE_BESSEL;
155155
is_approx
156156
$win->init( $Nbw, 'kaiser', 8.6 / 3.1415926 )->enbw,
157157
1.72147863,
@@ -210,7 +210,7 @@ subtest 'scalloping loss of windows.' => sub {
210210
}
211211

212212
SKIP: {
213-
skip 'PDL::GSLSF::BESSEL not installed', 3 unless $HAVE_BESSEL;
213+
skip 'PDL::GSL::SF not installed', 3 unless $HAVE_BESSEL;
214214
is_approx $win->init( 1000, 'kaiser', 0.5 )->scallop_loss, -3.31, 'kaiser 0.5', 3;
215215
is_approx $win->init( 1000, 'kaiser', 1.0 )->scallop_loss, -2.42, 'kaiser 1.0', 3;
216216
is_approx $win->init( 1000, 'kaiser', 5.0 )->scallop_loss, -1.05, 'kaiser 5.0', 3;
@@ -263,7 +263,7 @@ subtest 'relation between periodic and symmetric.' => sub {
263263

264264
for my $name ( keys %tests ) {
265265
SKIP: {
266-
skip 'PDL::GSLSF::BESSEL not installed', 1
266+
skip 'PDL::GSL::SF not installed', 1
267267
if $name eq 'kaiser' and not $HAVE_BESSEL;
268268

269269
skip 'PDL::LinearAlgebra::Special not installed', 1

0 commit comments

Comments
 (0)