Commit cd942326 authored by Zolnierczuk, Piotr's avatar Zolnierczuk, Piotr
Browse files

getting ready for NIST data reader

parent 2cb93366
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2,8 +2,8 @@
export PROJECT=drspine

export VERSION_MAJOR=1
export VERSION_MINOR=2
export VERSION_RELEASE=4
export VERSION_MINOR=3
export VERSION_RELEASE=0

export PROJLIB=lib$(PROJECT).a
export PROJARCH=$(PROJECT)-$(VERSION_MAJOR).$(VERSION_MINOR)
+47 −19
Original line number Diff line number Diff line
@@ -2,8 +2,8 @@
\section{DrSPINE Quick Installation
Guide}\label{drspine-quick-installation-guide}}

\hypertarget{pre-requsites}{%
\subsection{Pre-requsites}\label{pre-requsites}}
\hypertarget{prerequisites}{%
\subsection{1. Prerequisites}\label{prerequisites}}

\hypertarget{fortran-compiler}{%
\subsubsection{Fortran Compiler}\label{fortran-compiler}}
@@ -18,21 +18,32 @@ Guide}\label{drspine-quick-installation-guide}}
  Intel Fortran v12.0 or newer
\end{itemize}

\hypertarget{gr-framework}{%
\subsubsection{GR Framework}\label{gr-framework}}

The report command in DrSPINE uses the GR Framework (gr-framework.org).
Follow installation instructions for the C library GR.

\hypertarget{python}{%
\subsubsection{Python}\label{python}}

Python3 interpreter and several SciPy packages.
In order to use `plot' command in DrSPINE one needs Python3 interpreter
and several SciPy (scipy.org) packages.

\begin{itemize}
Two convenient methods exist:

\begin{enumerate}
\def\labelenumi{\alph{enumi})}
\item
  Use Anaconda Python distribution, see http://www.continuum.io/anaconda
  Install full Anaconda Python distribution, see
  http://www.continuum.io/anaconda
\item
  Use minimal Anaconda - Miniconda, see
  http://conda.pydata.org/miniconda and and install ipython, matplotlib,
  scipy and numpy with the following command:
  Or install minimal Anaconda - Miniconda, see
  http://conda.pydata.org/miniconda and then install only relevant scipy
  and numpy packages with the following command:

  conda install ipython matplotlib numpy scipy
\end{itemize}
\end{enumerate}

\hypertarget{tex-live}{%
\subsubsection{TeX Live}\label{tex-live}}
@@ -40,12 +51,15 @@ Python3 interpreter and several SciPy packages.
In order to rebuild the documentation one needs full TeX Live
https://www.tug.org/texlive distribution.

Note: it works ``out of the box'' on Ubuntu (14,16) and MacOS with Tex
Live 2016. RedHat/CenOS 7 require extra packages to be downloaded from
CTAN archive.
Note: it works ``out of the box'' on Ubuntu (14,16,20) and MacOS with
Tex Live 2016 or newer. RedHat 7 requires extra packages to be
downloaded from the CTAN archive.

\hypertarget{installation}{%
\subsection{2. Installation}\label{installation}}

\hypertarget{createedit-makefile.def}{%
\subsection{Create/edit Makefile.def}\label{createedit-makefile.def}}
\subsubsection{Create/edit Makefile.def}\label{createedit-makefile.def}}

The defaults should work in most cases. Edit only if needed.

@@ -55,7 +69,7 @@ edit Makefile.def
\end{verbatim}

\hypertarget{build-and-install}{%
\subsection{Build and install}\label{build-and-install}}
\subsubsection{Build and install}\label{build-and-install}}

Build DrSPINE for SNS-NSE

@@ -69,8 +83,9 @@ or, alternatively, build for J-NSE
make INSTRUMENT=2 all && make install DESTDIR=$HOME/local
\end{verbatim}

\hypertarget{set-up-ipython-profile}{%
\subsection{Set-up IPython profile}\label{set-up-ipython-profile}}
\hypertarget{set-up-the-ipython-profile}{%
\subsubsection{Set-up the IPython
profile}\label{set-up-the-ipython-profile}}

Do it only once!

@@ -79,12 +94,25 @@ source $HOME/local/bin/drspine_create_env.sh
\end{verbatim}

\hypertarget{activate-drspine-environment-and-run-a-test}{%
\subsection{Activate DrSpine environment and run a
\subsubsection{Activate DrSpine environment and run a
test}\label{activate-drspine-environment-and-run-a-test}}

\begin{verbatim}
source $HOME/local/bin/drspine_activate.sh

drspine -o /tmp -d $DRSPINE/share/drspine \
        -x $DRSPINE/share/drspine/macro_mk
drspine -o /tmp -d $HOME/local/share/drspine \
        -x $HOME/local/share/drspine/macro_mk
\end{verbatim}

\hypertarget{add-drspine-environment-to-your-shell-initialization-script}{%
\subsubsection{Add DrSpine environment to your shell initialization
script}\label{add-drspine-environment-to-your-shell-initialization-script}}

Add the following line

\begin{verbatim}
source $HOME/local/bin/drspine_activate.sh
\end{verbatim}

to your \$HOME/.bashrc (for bash) or \$HOME/.zshrc (for zsh) depending
on which shell is your default.
+20 −1
Original line number Diff line number Diff line
@@ -34,6 +34,25 @@ contains
    type(config_struct),intent(inout) :: config    ! geometry, detector config
    type(bin_struct), intent(in)      :: tbins     ! time channels binning


    !! for future expansions
    call read_echo_data_standard(scan_data, filename, config, tbins)

  end subroutine read_echo_data



  ! ##############################################################################
  ! READ ECHO DATA (J-NSE, SNS-NSE)
  ! "standard" ASCII NSE data format (J-NSE and SNS-NSE)
  ! ##############################################################################
  subroutine read_echo_data_standard(scan_data, filename, config, tbins)
    ! subroutine arguments
    type(scan_struct), intent(inout), target :: scan_data ! output scan
    character(len=*), intent(in)      :: filename  ! input file name
    type(config_struct),intent(inout) :: config    ! geometry, detector config
    type(bin_struct), intent(in)      :: tbins     ! time channels binning

    ! local variables
    type(scan_data_struct), pointer :: scan_point
    type(detector_struct)           :: detector
@@ -1344,7 +1363,7 @@ contains
        environment(nphase)%no_magnetic_sensors = nm
    end subroutine read_environment_jnse

  end subroutine read_echo_data
  end subroutine read_echo_data_standard

  ! ##############################################################################
  ! READ TRANSMISSION DATA
+1 −1
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@ program testosutils
  call test_format_path()
  call test_search_path()
  call test_create_directory()
  call test_os_openfile()
  !call test_os_openfile() ! remove from automatic tests
  call test_change_directory()
  call test_execute_command()
  call test_truncate_filename()