Commit 5b2ff03e authored by Zolnierczuk, Piotr's avatar Zolnierczuk, Piotr
Browse files

new bgr subtraction mode

- new bgr subtraction scheme (bgr 16) where force bgr data amplitudes to be positive
- added Visual Studio workspace config
parent fc124384
Loading
Loading
Loading
Loading
+14 −5
Original line number Diff line number Diff line

commit
- [PZ] new bgr subtraction scheme (bgr 16) where force bgr data amplitudes to be positive
- [PZ] updated testdrspine.sh script
       updated python setup
- [PZ] added visual studio code workspace file
- [PZ] annotate water cross sections plots
- [PZ] added git branches description (BRANCHES.md)
- [PZ] cmd_dump - added new keyword all
	   if present dumps all tbin (TOF) channels
	   default is to dump the sum over entire wavelength band
- [PZ] introduced q_auto Python script, automatic q-binning
       fixed bug in load_sqt_bin
- [PZ] python cleanup
- [PZ] added missing test files
- [PZ] added missing_latex.sh to a list of installed scripts
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@ export PROJECT=drspine

export VERSION_MAJOR=2
export VERSION_MINOR=0
export VERSION_RELEASE=0-a6
export VERSION_RELEASE=0-a7

export PROJLIB=lib$(PROJECT).a
export PROJARCH=$(PROJECT)-$(VERSION_MAJOR).$(VERSION_MINOR)

drspine.code-workspace

0 → 100644
+8 −0
Original line number Diff line number Diff line
{
	"folders": [
		{
			"path": "."
		}
	],
	"settings": {}
}
+0 −1
Original line number Diff line number Diff line
@@ -277,7 +277,6 @@ def plot_sqt(filename, **kwargs):
#18-20 :  q_vec
def _load_sqt_bin(filename, full_bw=False):
    s = load_txt(filename, delimiter=',', cleanup=['NaN', 'Infinity'], skiprows=1)
    print(s.shape)

    sel = s[:,0]==0      # full bw data (it==0)
    if full_bw:
+4 −3
Original line number Diff line number Diff line
@@ -9,10 +9,11 @@ import matplotlib.pyplot as plt
from scipy.optimize import fsolve
from scipy.stats    import gaussian_kde

def load_txt(filename, delimiter=',', cleanup=None):
def load_txt(filename, delimiter=',', cleanup=None, skiprows=0):
    """load txt with some cleanup"""
    with open(filename, 'r', encoding='ascii') as fd:
        data = fd.readlines()
    data = data[skiprows:]
    if cleanup:
        for remove in cleanup:
            data = [ line for line in data if not remove in line]
@@ -34,7 +35,7 @@ def load_sqt_bin(filename, full_bw=False):
    #17    :  run_number
    #18-20 :  q_vec
    """
    s = load_txt(filename, delimiter=',', cleanup=['NaN', 'Infinity'])
    s = load_txt(filename, delimiter=',', cleanup=['NaN', 'Infinity'], skiprows=1)

    if full_bw:
        return s[s[:,0]==0] # only full band width
@@ -255,7 +256,7 @@ def main():
    for q in q_edges:
        ax1.axhline(q, color='b', ls='--', lw=1)
        ax2.axhline(q, color='b', ls='--', lw=1)
        print(f"{q:.4f}/A", end=' ')
        print(f"{q:.3f}/A", end=' ')
    if args.auto:
        print(" ! auto calculated")
    else:
Loading