Commit c6985522 authored by Claus Kleinwort's avatar Claus Kleinwort
Browse files

minor fixes and improvements

git-svn-id: http://svnsrv.desy.de/public/MillepedeII/trunk@121 3547b9b0-65b8-46d3-b95d-921b3f43af62
parent 212fd979
......@@ -95,8 +95,11 @@ SUBROUTINE sqminv(v,b,n,nrank,diag,next) ! matrix inversion
REAL(mpd) :: vkk
REAL(mpd) :: vjk
REAL(mpd), PARAMETER :: eps=1.0E-10_mpd
!REAL(mpd), PARAMETER :: eps=1.0E-10_mpd
REAL(mpd) eps
! ...
eps = 16.0_mpd * epsilon(eps) ! 16 * precision(mpd)
next0=1
l=1
DO i=1,n
......
......@@ -2899,6 +2899,7 @@ SUBROUTINE loopbf(nrej,ndfs,sndf,dchi2s, numfil,naccf,chi2f,ndff)
nter=1 ! first loop without down-weighting
IF(nloopn /= 1.AND.lhuber /= 0) nter=lhuber
localCorrections(1:neq) = 0._mpd
! check matrix for bordered band structure (MBDR+MBND+1 <= NALC)
mbnd=-1
......
#!/usr/bin32/python
#
import array
import array, sys
### read millepede binary file #################
# print information (tested with SL4)
# for C files
......@@ -12,8 +12,8 @@ intfmt = 'i'
# SL4, gcc-3
#intfmt = 'l'
#
# input file
f = open("milleBinaryISN.dat","rb")
# input file name
fname = "milleBinaryISN.dat"
#
# number of records (tracks) to show
mrec = 10
......@@ -22,6 +22,22 @@ skiprec = 0
#
### C. Kleinwort - DESY ########################
### use command line arguments ?
narg = len(sys.argv)
if narg > 1:
if narg < 3:
print " usage: readMilleBinary.py <file name> <number of records> [<number of records to skip>]"
sys.exit(2)
else:
fname = sys.argv[1]
mrec = int(sys.argv[2])
if narg > 3:
skiprec = int(sys.argv[3])
#print " input ", fname, mrec, skiprec
f = open(fname,"rb")
nrec=0
try:
while (nrec<mrec+skiprec):
......@@ -30,12 +46,15 @@ try:
lenf=array.array(intfmt)
lenf.fromfile(f,2)
len=array.array(intfmt)
len.fromfile(f,1)
nr=len[0]/2
length=array.array(intfmt)
length.fromfile(f,1)
nr=abs(length[0]/2)
nrec+=1
glder=array.array('f')
if length[0]>0:
glder=array.array('f')
else:
glder=array.array('d')
glder.fromfile(f,nr)
inder=array.array(intfmt)
......@@ -45,10 +64,10 @@ try:
lenf=array.array(intfmt)
lenf.fromfile(f,2)
if (nrec < skiprec): # must be after last fromfile
if (nrec <= skiprec): # must be after last fromfile
continue
print " === NR ", nrec, nr
print " === NR ", nrec, length[0]/2
i=0
nh=0
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment