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

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 method is using a PIV card -- provided you have one -- is by adding the card 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
  • 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
    • 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 the following line to your ~/.gnuplot file:
    • set colorsequence classic
  • brew install ghostscript
  • brew install enscript
  • Download and install MacTex from http://tug.org/mactex

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"