- Home
- Getting Started
- Documentation
- Release Notes
- Tour the Interface
- Tour the Layers
- JMARS Video Tutorials
- Lat/Lon Grid Layer
- Map Scalebar
- Nomenclature
- Crater Counting
- 3D
- Shape Layer
- Mosaics
- Map
- Advanced/Custom Maps
- Graphic/Numeric Maps
- Custom Map Sharing
- Stamp
- THEMIS
- MOC
- Viking
- CRISM Stamp Layer
- CTX
- HiRise
- HiRISE Anaglyph
- HiRISE DTM
- HRSC
- OMEGA
- Region of Interest
- TES
- THEMIS Planning
- Investigate Layer
- Landing Site Layer
- Tutorials
- Video Tutorials
- Displaying the Main View in 3D
- Finding THEMIS Observation Opportunities
- Submitting a THEMIS Region of Interest
- Loading a Custom Map
- Viewing TES Data in JMARS
- Using the Shape Layer
- Shape Layer: Intersect, Merge, and Subtract polygons from each other
- Shape Layer: Ellipse Drawing
- Shape Layer: Selecting a non-default column for circle-radius
- Shape Layer: Selecting a non-default column for fill-color
- Shape Layer: Add a Map Sampling Column
- Shape Layer: Adding a new color column based on the values of a radius column
- Shape Layer: Using Expressions
- Using JMARS for MSIP
- Introduction to SHARAD Radargrams
- Creating Numeric Maps
- Proxy/Firewall
- JMARS Shortcut Keys
- JMARS Data Submission
- FAQ
- Open Source
- References
- Social Media
- Podcasts/Demos
- Download JMARS
Develop3
This tutorial will walk users through the process of creating a segment for the global IR mosaics.
Step #1: Setup Your Working Directory
Working directories for each of the Day and Night IR global mosaic segments have already been created. But before beginning work on a segment, you will need to finish setting up the working directory.
1. On a Moeur Bldg Linux machine, open a terminal window and go to the working directory for the segment you are working on. For example, if you are working on the Day IR global mosaic segment from lat=0:30 and lon=180:240, you can change to the working directory by typing:
> cd /mars/globalmosaic2/dcyl_100/lat00/lon180
2. In a new working directory, the only file in the directory should be a "file_list_master". Start by making a copy of this file list called "mosaic_list" by typing:
> cp file_list_master mosaic_list
3. Now the file list needs to be sort from west-to-east using the vsort script, which you can run by typing:
> /themis/lib/mosaic/vsort.sh -f ./mosaic_list
-
- - This will output a file called "file_list" that we will use for the rest of the mosaicing process.
- - This will output a file called "file_list" that we will use for the rest of the mosaicing process.
4. Next, we need to copy in a mosaicing script that has all the necessary parameters set for the global mosaic segments. To avoid confusion, these special mosaic scripts have been renamed gmosaic.dv and placed in each global mosaic master directory. You can copy it into the working directory, type:
> cp ../../gmosaic.dv .
5. Before the mosaic segment can be run, we need to create a blank mosaic to put all of the images in. This is a 4 step process:
-
- a. Run a tail command on the file_list and choose any of the image IDs it outputs:
- a. Run a tail command on the file_list and choose any of the image IDs it outputs:
> tail file_list
-
- b. Copy the actual image to your working directory. (For example, image ID I23855018):
- b. Copy the actual image to your working directory. (For example, image ID I23855018):
> cp /mars/globalmosaic3/dcyl_100/projected/I23855018.cub .
-
- c. Convert the image data from "short" to "byte" format:
- c. Convert the image data from "short" to "byte" format:
> dsk2dsk from=I23855018.cub to=tmp.cub otype=1 orange=0:255
-
- d. Create a blank mosaic using the "byte" format image as a template: (Replace the latitude and longitude values with the values for your segment, making sure to add an additional 2deg on each end.)
- d. Create a blank mosaic using the "byte" format image as a template: (Replace the latitude and longitude values with the values for your segment, making sure to add an additional 2deg on each end.)
> mosaic from=tmp.cub to=mos.cub lat=-2:32 lon=178:242 init=yes
Step #2: Edit the File List Using JMARS
The starting file lists in the working directories are from the last attempt at creating a global IR mosaic. We're going to add additional images to these lists to fill in (hopefully) all the gaps.
1. On a Moeur Bldg Linux machine, start JMARS by typing:
> jmars clean 0 0
2. Open a stamp layer by going to "Add New Layer" -> "Stamps" -> "THEMIS STAMPS" and copy the file_list from your working directory into the "Image ID" section of the Stamp Layer. Then click "Okay" to load the stamps.
-
- -You can use the "emacs file_list" command to view the file list in your working directory.
- -You can use the "emacs file_list" command to view the file list in your working directory.
3. While you have the file_list in your working directory open, copy the list to a spreadsheet so it can be more easily manipulated in future steps.
4. In the "Settings" tab of the Stamp Layer, move the "Fill Alpha" slider to the right. This will fill in all the stamps and make it easier to see the gaps.
5. Now we need to search for new images that will fill gaps in the existing file list. Open a second stamp layer by going to "Add New Layer" -> "Stamps" -> "THEMIS STAMPS". In the initial search box, we're going to add the following constraints:
-
- - Image Type = IR
- - Min Orbit = 23800 (No Max Orbit)
- - Max Incidence Angle = 85 (No Min Incidence Angle)
- - Bands = 9
- - Summing = "1-1"
- - Image Rating = "5-7"
- - Change the default color from blue to some other color.
- - Image Type = IR
Click "Okay" to load the new stamps.
6. Now go through the new stamps to see if any of them cover gaps in the original stamp list. When you find one that does, right click on it and select "Copy Selected Image to the Clipboard". Then paste the Image ID to the end of your spreadsheet by center clicking.
-
- - If you change the background color, you will be able to tell which ones you have added.
- - If you change the background color, you will be able to tell which ones you have added.
7. Repeat this process to fill in as many gaps as possible. If you start to lose track of which gaps you have filled, you can copy the new IMAGE IDs from your spreadsheet to the first stamp layer in JMARS, which will add them to the original blue stamps.
If there are still gaps in the blue coverage when you are done, go back to your second Stamp Layer, go to the "Query" tab and change your Image Rating requirements to "4-4" and repeat the gap filling process above. If you still have more gaps, you can then try setting Image Rating to "3-3" and repeating the process.
-
- -The Image Rating 1-2 images are way too bad to use for the global mosaic. We will probably end up taking out most of the 3's as well, but we'll see what they look like.
- -The Image Rating 1-2 images are way too bad to use for the global mosaic. We will probably end up taking out most of the 3's as well, but we'll see what they look like.
Step #3: Projecting the New IR Images
When you have finished filling as many of the mosaic gaps as possible, you'll need to project the new images so you can add them to the mosaic.
1. Open a new terminal window and go to the "projected" directory for the mosaic you are working on. For example, for the Day IR mosaic equatorial segments, type:
> cd /mars/globalmosaic3/dcyl_100/projected/
2. Open the file_list in this directory by typing:
> emacs file_list
-
- - This is not the file_list that will be used for the mosaics. This is the file_list that tells the projection script which images to project. Sorry if this causes any confusion!
- - This is not the file_list that will be used for the mosaics. This is the file_list that tells the projection script which images to project. Sorry if this causes any confusion!
3. Now add the new images from your spreadsheet to the end of this file list and save the file.
4. re-run the projection script by typing:
> ./project_ir.sh
-
- - This will submit all the projection jobs to the cluster. Use the "qstat" command to monitor them. You can't run the mosaic until all of the new images are projected.
- - This will submit all the projection jobs to the cluster. Use the "qstat" command to monitor them. You can't run the mosaic until all of the new images are projected.
Step #4: Running the Mosaic
When all the new images have been projected, you'll need to run the mosaic to see what it looks like. (The IR mosaic will run much faster than the VIS polar mosaic with similar numbers of images since the resolution is not as high.)
1. In your mosaic working directory, we need to replace the old file_list with the new file list you have built in your spreadsheet. First, remove the old file list by typing:
> rm file_list
'Second, create a new file_list by typing:
> emacs file_list
Copy your spreadsheet into the popup text editor and save the file.
2. Before sending your mosaic job to the cluster, test it first. Type:
> ./gmosaic.dv
- One of three things will happen:
- i)The script will run fine and you will begin getting messages like "Processing Image 1 of 2000". In this case, do a Ctrl-C and continue with step 3 below.
- ii)The script will report that certain images are missing band 9. Remove the image IDs it reports from your file_list and try again.
- iii)The script will report that images are not found. In this case, when you ran the projection script it probably dropped a couple jobs. Rerun the projection script in /mars/globalmosaic3/dcyl_100/projected. When it finishes (use "qstat" to check on its status), re-try this step again.
- i)The script will run fine and you will begin getting messages like "Processing Image 1 of 2000". In this case, do a Ctrl-C and continue with step 3 below.
3. To avoid bogging down your computer, we're going to run the mosaic script on a cluster machine. This way, you will be able to log out of your machine while it is mosaicing. For mosaic segments that do NOT border the prime meridian, send the mosaicing job to the cluster machine by typing:
> global_mosaic
-
- -If this returns an error, let me know. I'll have to add the command to your .cshrc file.
- -If this returns an error, let me know. I'll have to add the command to your .cshrc file.
For mosaic segments that DO border the prime meridian, send the mosaicing job to the cluster machine by typing:
> global_mosaic_180
-
- -If this returns an error, let me know. I'll have to add the command to your .cshrc file.
- -If this returns an error, let me know. I'll have to add the command to your .cshrc file.
4. Wait a minute and then do an "ls -lrt" command in the directory you just started mosaicing. One of two things will happened:
-
- a. If the last file in the list is a "full001.png", everything is running fine. When the mosaic is finished, the script will write out a file called "full.png".
- b. If the script fails, it will output error messages that say that certain images in the file list do not contain band 9. In this case, open you file list with emacs and remove the Image IDs it's having trouble with. (This should only be one or two. If it's a lot more, come see me.)
- a. If the last file in the list is a "full001.png", everything is running fine. When the mosaic is finished, the script will write out a file called "full.png".