You can run the NASA algorithm locally like so:
nasa/run.sh CALIBRATION_FILE LEFT BOTTOM RIGHT TOP
where:
CALIBRATION_FILE
is the path to calibration file on the file systemLEFT
is the left longitude of your desired bounding boxBOTTOM
is the bottom latitude of your desired bounding boxRIGHT
is the right longitude of your desired bounding boxTOP
is the top latitude of your desired bounding box
As a convenience, this will automatically do the following for you:
- Create a conda environment named
sar2-d2
, if it does not already exist. - Install all dependencies in
environment.yml
andenvironment-dev.yml
whenever the environment is (re-)created or one (or both) of the files have been modified since the environment was (re-)created. - Run the code with the
sar2-d2
environment automatically activated (i.e., there is no need for you to manually activate the environment).
To register the algorithm (or re-register it after making code changes), run the following command:
nasa/algorithm/register.py
This will kick off a process to build a new algorithm image, and will output a link where you can check the progress of this process, which may take several minutes. The new version of the algorithm will not be available for submitting jobs until this process completes successfully. Once the process completes successfully, the new version of the algorithm is considered "registered."
Once the algorithm is registered (or re-registered), you may submit a job using the following command:
nasa/job/submit.py CALIBRATION_FILE LEFT BOTTOM RIGHT TOP
where the arguments are the same as those used when running the algorithm
locally (see above), with the following difference: if CALIBRATION_FILE
is
not a URL, it will automatically be converted to a URL if its path starts with
/projects/my-public-bucket
or /projects/shared-bucket/USERNAME
(where
USERNAME
is the username of any MAAP user, not necessarily your username).
If the job was successfully submitted, the command above will print out the job ID of the newly submitted job, which you can use to check the job status.
After successfully submitting a job, you can use the job ID to check its status:
nasa/job/status.py JOB_ID
where JOB_ID
is the job ID printed out by the job submission command.
You can also get more information about the job, using the following command:
nasa/job/result.py JOB_ID
If the job has completed, successfully or not, the command will indicate where the results were written. If the job failed, the command should also show an error message, that may or may not be helpful, and may require looking at the triaged job files for more information.