Skip to content

Commit

Permalink
Merge pull request #387 from olebole/noirlab-compatibility
Browse files Browse the repository at this point in the history
Add numerical recipes to libxtools for Noirlab compatibility
  • Loading branch information
olebole authored Apr 3, 2024
2 parents c420938 + 6acd564 commit 1850274
Show file tree
Hide file tree
Showing 9 changed files with 126 additions and 277 deletions.
13 changes: 0 additions & 13 deletions noao/artdata/gammln.c

This file was deleted.

2 changes: 0 additions & 2 deletions noao/artdata/mkpkg
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ libpkg.a:
mkheader.x <ctype.h> <imhdr.h> <imio.h>
mktemplates.x mktemplates.com <error.h> <imhdr.h> <math.h>\
<math/iminterp.h>
numrecipes.x <math.h>
gammln.c
t_mk1dspec.x <error.h> <imhdr.h>
t_mk2dspec.x <error.h> <imhdr.h> <math/iminterp.h>
t_mkechelle.x <error.h> <imhdr.h> <math.h>
Expand Down
92 changes: 0 additions & 92 deletions noao/artdata/numrecipes.x

This file was deleted.

9 changes: 9 additions & 0 deletions noao/astutil/asttools/asttimes.x
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,15 @@ end
#
# Copyright (C) 2013-2017, NumFOCUS Foundation.
# Derived, with permission, from the SOFA library.
#
#############################################################################
# This code was copied/derived from the 'iraf-community' repository to
# address known licensing issues with Numerical Recipes code.
#
# Source Repository: https://github.com/iraf-community/iraf
# Author: Ole Streicher
#############################################################################


procedure ast_julday_to_date (j, year, month, day, t)

Expand Down
19 changes: 14 additions & 5 deletions pkg/xtools/gammln.c
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
#define import_spp
#include <iraf.h>
/* Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
*/

#include <math.h>

double lgamma (double x);
float lgammaf (float x);


/* GAMMLN -- Return natural log of gamma function.
* Argument must greater than 0.
*/

XREAL gammln_ (XREAL *xx)
float gammln_ (float *x)
{
float lgammaf(float);
return lgammaf (*x);
}

return lgammaf(*xx);
double dgammn_ (double *x)
{
return lgamma (*x);
}
2 changes: 2 additions & 0 deletions pkg/xtools/mkpkg
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ libxtools.a:
dttext.x <ctotok.h> <ctype.h> <error.h> <finfo.h> <fset.h>\
<pkg/dttext.h> <time.h>
extrema.x
gammln.c
getdatatype.x
gstrdetab.x
gstrentab.x
Expand Down Expand Up @@ -77,4 +78,5 @@ libxtools.a:
xtstripwhite.x <ctype.h>
xtsums.x
xttxtfio.x
numrecipes.x
;
Loading

0 comments on commit 1850274

Please sign in to comment.