Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge NR code removal from NOIRLABs version #8

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/mwcs/mwlu.x
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@
#
# These routines simply call the LU composition routines provided by LAPACK.

#############################################################################
# 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
#############################################################################



# MW_LUDECOMPOSE -- Replace an NxN matrix A by the LU decomposition of a
# rowwise permutation of the matrix. The LU decomposed matrix A and the
Expand Down
36 changes: 0 additions & 36 deletions src/xonedspec/splot/spdeblend.x
Original file line number Diff line number Diff line change
Expand Up @@ -785,39 +785,3 @@ begin
ng = 0
call sfree (sp)
end


# GASDEV -- Return a normally distributed deviate with zero mean and unit
# variance. The method computes two deviates simultaneously.
#
# Copyright(c) 2017 Anastasia Galkin
# Reference: G. E. P. Box and Mervin E. Muller, A Note on the Generation of
# Random Normal Deviates, The Annals of Mathematical Statistics
# (1958), Vol. 29, No. 2 pp. 610–611

real procedure gasdev (seed)

long seed

int count
data count/0/

real u1, u2, x
real urand()

begin
if (count == 0) {
repeat {
u1 = 2 * urand (seed) - 1.
} until (u1 > 0)
repeat {
u2 = 2 * urand (seed) - 1.
} until (u1 > 0)
x = sqrt(-2 * log(u1)) * cos(2*PI*u2);
count = 1
} else {
x = sqrt(-2 * log(u1)) * sin(2*PI*u2);
count = 0
}
return (x)
end
1 change: 0 additions & 1 deletion src/xrv/mkpkg
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ libpkg.a:
fftutil.x rvflags.h rvpackage.h rvplots.h <math.h>
filtpars.x rvcomdef.h rvfilter.h rvflags.h rvpackage.h
keywpars.x rvcomdef.h rvkeywords.h rvpackage.h
numrep.x <mach.h> <math.h>
plotpars.x rvcomdef.h rvflags.h rvpackage.h rvplots.h
prepspec.x rvflags.h rvpackage.h rvsample.h <math.h>
readtlist.x rvflags.h rvpackage.h <imhdr.h>
Expand Down
83 changes: 0 additions & 83 deletions src/xrv/numrep.x

This file was deleted.

2 changes: 1 addition & 1 deletion src/xrv/rvcorrel.x
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ include "rvfilter.h"
# used as a working space. Sign convention of this routine, if DATA1 lags
# DATA2, i.e. is shifted to the right of it, then ANS will show a peak at
# positive lags.
# Referece: Numerical Recipes in C, ch 12, Press, et al.
# Reference: Numerical Recipes in C, ch 12, Press, et al.

procedure rv_correl (rv, data1, data2, npts, ans)

Expand Down