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

Testfile and tabplot adjustments #86

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
29 changes: 18 additions & 11 deletions src/kernel/tab/Testfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

DIR = src/kernel/tab
BIN = tabmath tabplot tabhist tabspline tablsqfit tabnllsqfit tabdate \
tabfilter tabtrend gauss1d gauss2d meanmed tabstat
Expand All @@ -19,53 +20,63 @@ all: tab.in $(BIN) fitmyline
tab.in:
@echo Creating $@
$(EXEC) nemoinp 1:100 > tab.in

tabmath: tab.in
tab.out:
@echo Creating $@
$(EXEC) tabmath tab.in tab.out 'sqrt(%1)'; nemo.coverage tabmath.c
tabmath: tab.out
@echo Running $@
$(EXEC) tabmath tab.in tab.out 'sqrt(%1)'; nemo.coverage tabmath.c


tabplot:
tabplot: tab.in
@echo Running $@
$(EXEC) tabmath tab.in - 'sqrt(%1)' | $(EXEC) tabplot - ; nemo.coverage tabplot.c
$(EXEC) tabmath tab.in - 'sqrt(%1)' | $(EXEC) tabplot tab.out ; nemo.coverage tabplot.c

NMAX = 100000

tabhist:
@echo Running $*
$(EXEC) tabhist tab.out ; nemo.coverage tabhist.c
$(EXEC) nemoinp 1:1000 | $(EXEC) tabmath - - 'rang(0,1)' all seed=123 | $(EXEC) tabhist - ; nemo.coverage tabhist.c
$(EXEC) nemoinp 1:$(NMAX) nmax=$(NMAX) | $(EXEC) tabmath - - 'rang(0,1)' all seed=123 | $(EXEC) tabhist - nmax=-$(NMAX); nemo.coverage tabhist.c

tabstat:
@echo Running $*
tabstat tab.in; nemo.coverage tabstat.c
$(EXEC) nemoinp 1:1000 | $(EXEC) tabmath - - 'rang(0,1)' all seed=123 | $(EXEC) tabstat - ; nemo.coverage tabstat.c
$(EXEC) nemoinp 1:$(NMAX) nmax=$(NMAX) | $(EXEC) tabmath - - 'rang(0,1)' all seed=123 | $(EXEC) tabstat - nmax=-$(NMAX); nemo.coverage tabstat.c



meanmed:
@echo Running $*
meanmed tab.in; nemo.coverage meanmed.c
$(EXEC) nemoinp 1:1000 | $(EXEC) tabmath - - 'rang(0,1)' all seed=123 | $(EXEC) meanmed - ; nemo.coverage meanmed.c


tabspline:
@echo Running $*
tabspline tab.out y=2; nemo.coverage tabspline.c
$(EXEC) nemoinp 1:2:0.001 | $(EXEC) tabmath - - '%1*%1' | $(EXEC) tabspline - y=2; nemo.coverage tabspline.c

tablsqfit:
@echo Running $*
tablsqfit tab.out; nemo.coverage tablsqfit.c
$(EXEC) nemoinp 1:2:0.001 | $(EXEC) tabmath - - '%1+rang(0,0.1)' seed=123 | $(EXEC) tablsqfit - ; nemo.coverage tablsqfit.c

tablsqfit_gsl:
@echo Running $*
tablsqfit_gsl tab.out; nemo.coverage tablsqfit.c
$(EXEC) nemoinp 1:2:0.001 | $(EXEC) tabmath - - '%1+rang(0,0.1)' seed=123 | $(EXEC) tablsqfit_gsl - ; nemo.coverage tablsqfit.c

tabnllsqfit:
@echo Running $*
tabnllsqfit tab.out
$(EXEC) nemoinp 1:100 | $(EXEC) tabmath - - '4+exp(-(%1-50)**2/(200))+rang(0,0.1)' seed=123 |\
$(EXEC) tabnllsqfit - fit=gauss1d par=4,1,50,10; nemo.coverage tabnllsqfit.c

tabdate:
@echo Running $*
tabdate tab.in test.out %s %c
@echo 1000000000 | $(EXEC) tabdate - - %s %c

tabfilter:
Expand All @@ -74,17 +85,13 @@ tabfilter:

tabtrend:
@echo Running $*
tabtrend tab.in; nemo.coverage tabtrend.c
@nemoinp 0:4 | $(EXEC) tabmath - - '%1*%1' all | $(EXEC) tabtrend -

# testing object loading load= in tabnlsqfit from the fit/ directory
fitmyline_local:
(cd fit; make -f $(NEMOLIB)/Makefile.lib myline.so)
tabnllsqfit tab.out
tabnllsqfit tab.out load=fit/myline.so par=1,1

# testsuite
fitmyline:
tabnllsqfit tab.out
tabnllsqfit tab.out; nemo.coverage tabnllsqfit.c
tabnllsqfit tab.out load=$(NEMOOBJ)/fit/myline.so par=1,1

SIZE=4
Expand Down