Tethys
Accessing Data
All ADRIFT, PASCAL, and CCES deployment metadata and detection data are archived locally in our lab’s Tethys database.
The Tethys database is saved locally on the DON server (Z:/ANALYSIS/Tethys). Tethys has multiple ways to access/visualize the database, but these directions will only include opening the web client interface (main web app and Data Explorer).
Tethys Web Interface
Open Tethys batch file (Z:/ANALYSIS/Tethys/databases/metadata/tethys.bat)
NoteThis may take a while to load if you have never accessed this database or if you are accessing it remotely (up to an hour)
Once the tethys.bat file has loaded, you should see a website address in the command window to open the web interface (this will include your computer name)
Navigate to the web address and you should see the following screen
Follow the Tethys documentation for interacting with the web client
Tethys Data Explorer
- Navigate to the Data Explorer batch file (Z:/ANALYSIS/Tethys/DataExplorer/data_explorer.bat)
- If you are using swc-srankin1-d desktop, skip to step 5. Otherwise, proceed to step 3
- Right click on data_explorer.bat, and select edit
- Update the server argument to point to your computer/server name (changing “../python39/python.exe data_explorer.py –server http://swc-srankin1-d.nmfs.local:9779” to “../python39/python.exe data_explorer.py –server http://swc-kourtney-l.nmfs.local:9779”
- Save and close, and double click on data_explorer.bat to run the batch file
- There will be a series of automatic queries to access the database, and then you should see a prompt to open the Data Explorer at another web address. It should be http://127.0.0.1:8050/
- See Tethys Data Explorer documentation for more information
Archiving Deployment Metadata
Any new deployments saved in the Deployment Details spreadsheet need to be archived to our Tethys database.
Deployment Worksheet Prep Script
Follow these steps to prepare a Deployment Worksheet for Tethys
Clone the TethysSAEL repository to your local computer and open the Create_Deployment_Worksheet.Rfile
Make sure the deployments you want to archive are saved to the deployDetails sheet in Deployment Details, download the file as a .xslx, and save it to ‘~TethysSAEL\Deployment Worksheets’, overwriting the previous version if needed
In the Create_Deployment_Worksheet.R file, run lines 24-104 to create the function to make the worksheet
See the example function use in lines 9-14
##Example # change your project name as needed and number of repetitions = rep('CalCurCEAS',25) ProjectID # List out the deployment ID for each deployment you want to package =c('006','008','009','010','011','012','013','014','015','016','017','018','019','020','021','022','023','024','025','026','027') DepID# Run the function for the deployments set above mapply(makeTethysDep,ProjectID,DepID)
The output worksheets will be save to the main Deployment Worksheet folder. Move them to a project specific folder
Push your new Deployment Worksheets back to the repository
Importing Deployment Worksheets To Tethys
There are a variety of ways to import data to Tethys, these directions will cover the web client and Matlab based uploads. See Tethys Documentation for other options and more details
Web Client Uploads
Follow the steps in the Tethys Web Interface section above to start the server and open the Web Client
In the top right, click on the dropdown and select ‘Import data’
Set the Import Map to SWFSC.Mobile.Deployments.MultiChannel.wGPS.wSensors.wNotes, Collection to Deployments, and Species Coding to NOAA.NMFS.v4
Click on + Data Source, and ensure Microsoft Excel Driver is selected. Set the Source Name to swfsc
Click Select to choose a deployment worksheet to upload, or drag a file into the window.
Your screen should now look something like this
If you are making corrections to an existing Deployment Sheet, check the ‘Overwrite existing’ box. Click Upload to Tethys and the processing will start. If there is an error it will show up below step 3 in the image above. If there are no errors it will show the following message
Matlab Based Uploads
Note: This is currently not working so these are the general directions, however no screenshots are available to show step by step changes
Follow the steps in the Tethys Web Interface section above to start the server. Note, the web interface does not need to be open at this time
Open Matlab and enter the following into the command window
% Fill in your server name in the second argument dbSubmit('Server', 'http://SWC-SRANKIN1-D.nmfs.local:9779')
A new window should open called ‘Tethys Import Metadata’
If not already set, change the Tethys Server to match your server
Set Collection to Deployments, Import Map to SWFSC.Mobile.Deployments.MultiChannel.wGPS.wSensors.wNotes, and Species Abbreviations to NOAA.NMFS.v4
Select the file you want to import by setting the path in the File import Tab (select Overwrite existing if making updates to existing files)
Click Submit to Tethys and the process will start. Similar to the web client, messages will appear in the box below to indicate any errors or if the file upload was a success.
You can use this option to batch process by setting the path to a folder, rather than an individual file
Archiving Detections
Similar to archiving deployments, in progress
More info
See Tethys Documentation, Tethys SAEL GitHub repository, and our detailed ADRIFT methods for more information.