Skip to main content

SAM PDL Setup

Last Updated Jan 29, 2024

Prerequisites

  • Mac - We recommend that team members filling the PDL role use a Mac to perform their PDL duties, as that platform is the most thoroughly tested.
  • JPL RSA Token
  • GSFC RSA Token or PIV Card
  • Account on samioc, repos699

Terminal Setup

  • Default shell in macOS 10.15 (Catalina) or later is zsh, however, python tools require sh or bash
  • Recommended solution:
    • Create .zshrc file in home directory with the following lines:
    • emulate bash
    • source ~/.bash_profile
  • Run the command touch ~/.bash_profile to insure that the file exists

Terminal alternative

  • as of March 2023, the zsh shell on an M2 Mac was unstable with the SAM/MSL tools and would hang if more than one tab was opened. If the above solution works for you, great. If not:
  • install bash (using brew)
  • open preferences in terminal to open the bash shell you just installed. It will use the same .bash_profile script you created above.

SVN Access Notes

In order to access the SVN repository for SAM data, you need to be on the GSFC VPN and tunneled to the repository. The repository can be accessed using an RSA token or a PIV Card.

The easiest access method is a PIV card added to the ssh-agent. We suggest you create an alias for adding PIV card in your .bash_profile as shown:

alias pivmac='ssh-add -e /usr/lib/ssh-keychain.dylib; ssh-add -s /usr/lib/ssh-keychain.dylib'

You will be prompted to enter your PIN after running pivmac. The -e option removes any existing credentials before adding with -s. If you get a 'Card added' message, the process has worked. Once the card is added, commands like stunnel and rtunnel will pick up your card credentials and use them, automatically logging into the SVN host. The added card will remain in effect until you reboot. If the tunnel operation is not automatically logging in, try rerunning the pivmac command.

If you are still using an RSA Token, you must enter your token's code every time you tunnel.

Installation

General Tools

  • Install Homebrew
    • This will install Xcode command line tools as side effect: xcode-select --install
    • macOS 10.15 and above requires svn to be installed manually: brew install svn
  • Install BBEdit, although any text editor will do
  • Install X11
  • Install Mattermost and follow the operations channel
    • brew install mattermost

Python Tools

  • Install Python 3 from python.org

  • From Terminal:

    • pip3 install construct_legacy
    • If you receive a permission error and recommendation to use --user, then:
    • pip3 install --user construct_legacy
    • Apparently, the prior method of installing 'construct<2.8' is not working on some systems. Look at the error messages when you try to do this, as I recall it directs you how to correctly install construct.
    • IF you use tmplot2.py (and probably some other newer scripts), install matplotlib:
    • pip3 install matplotlib
  • If you have access to the code repository (repos699), tunnel into it and checkout python tools into your home directory

    • ssh username@repos699.gsfc.nasa.gov -L 6990:localhost:3690
      • Note: The above is equivalent to rtunnel, but that command is a python tool, so it will not be installed, yet
    • Then from a new terminal:
    • svn co svn://localhost:6990/labcode/699util/branches/ladeemaven py699
  • Otherwise, download py699_Rev2734.tgz

    • Double-click to decompress (Move aside existing "py699" if one already exists)
    • Move new "py699" directory to home directory

NOTE: the repos699 method is recommended, as it will make python tool updates much easier

  • Edit your ~/.bash_profile to include the following lines:

    source ~/py699/shell/pyconfig.sh

    source ~/py699/shell/tids.sh

  • Prior Bugs: If you encounter any of the following messages, upgrade py699 to the latest.

    • "AttributeError: module 'collections' has no attribute 'Mapping'"
    • Missing windll on Macs

Limit Check/Plotref

  • brew install gnuplot
    • The original color scheme from GNUPlot 4 is available by adding a line to your gnuplotrc file. Find gnuplotrc file by running gnuplot in a terminal window then typing “show loadpath”. Exit out of gnuplot. Navigate to the loadpath listed previously, then
    • open the gnuplotrc file – add this line to get classic line colors
    • set colorsequence classic
  • brew install ghostscript
  • brew install enscript
  • Download and install MacTex from http://tug.org/mactex (*this might no longer be necessary, I didn't install it and PDL tools have worked fine for me. DA - Jan 2024)

Download Data

  • Connect to GSFC VPN
  • From a new Terminal window: stunnel
  • From another Terminal window:
    • cd
    • svn co svn://localhost:6991/samgse gse
    • svn co svn://localhost:6991/samdata
    • ln -s samdata/fmdata gse/data
  • With BBEdit create .699config.INI file in your home directory. Copy the text below, then search and replace 'myname' with your username.

NOTE: The first time you commit data to the repository, you will need to login to the Authentication Realm: <svn://localhost:6991> SAMIOC

  • If you don't know your repository username and password, contact Kiran and Micah.
    [SAM]
    gse = /Users/myname/gse
    tm_definitions = /Users/myname/gse/TMDef
    tm_database = /Users/myname/gse/TMDef/SAM_TM_Database.txt
    sclk_table = /Users/myname/gse/TMDef/SAM_SCLK.txt
    heater_table = /Users/myname/gse/fswTables/heater.txt
    data_root = /Users/myname/samdata/fmdata
    repository_hostname = samioc.gsfc.nasa.gov
    repository_port = 6991
    repository_url = svn://localhost:6991/samdata

    [SAM_TESTBED]
    gse = /Users/myname/gse
    tm_definitions = /Users/myname/gse/TMDef
    tm_database = /Users/myname/gse/TMDef/STB_TM_Database.txt
    sclk_table = /Users/myname/gse/TMDef/STB_SCLK.txt
    heater_table = /Users/myname/gse/fswTables/heater.txt
    data_root = /Users/myname/samdata/tbdata
    repository_hostname = samioc.gsfc.nasa.gov
    repository_port = 6991
    repository_url = svn://localhost:6991/samdata

FEIGET

  • Install Java
  • Go to FEI GUI Page
  • Click 'Launch the FEI5 GUI App for MSL'
  • Control-click the resulting jnlp file and select 'Open'
  • Change the pop-up menu that reads 'MSL' to 'MSLOPS'
  • Click the button to the right of the menu with a green arrow inside a blue circle
  • Login using your JPL RSA token
  • Enter the 'msl_misc' directory by double-clicking it in the right pane
  • Navigate the left pane, labeled 'Local Filesystem,' to your home folder
  • Select the highest version of fei*msl for unix in the right pane and click the left pointing arrow
  • From Terminal:
    • cd /usr/local
    • sudo mkdir fei5
    • cd fei5
    • sudo tar xvf ~/fei*msl_unix.tar
  • Edit ~/.bash_profile to add the following line:
    • cd /usr/local/fei5/latest/; source use_FEI5.sh; cd -;
  • From a new Terminal:
    • fei5kinit
    • Enter MSLOPS for Server group
    • Enter your username
    • Use JPL RSA Token to login
  • cd ~/gse
  • ln -s ~/samdata/fmdata data
  • cd data
  • mkdir edrhub
  • cd edrhub
  • date "+%Y-%m-%dT%H:%M:%S" > lastfei.txt
  • initcsvreports

Ops

PDL Bookmarks

Optional

  • Install samdataview
    • Go to home directory and double-click "gse" then "Apps"
    • Open samdataview_MAC.dmg
    • Drag "samdataview" (the Yosemite Sam icon) to "Applications"