ESCI 442/542: Introduction to Remote Sensing

General Working Guidelines for Computer Labs

Last updated: 12/12/2022

Developing Good "Work Habits" on the Computer: Poor work habits on the computer can lead to many hours of wasted effort in front of the computer. Poor work habits make it more likely that you will lose or overwrite files that you need and lose track of which tasks you have completed. This means that you will be more likely to lose days or evens weeks worth of work. You will find yourself re-doing lab exercises two, three or even four times. Students with good work habits can make rapid progress in the lab and concentrate on understanding concepts. Students with poor work habits are consumed by the drudgery of redoing the same tasks again and again and lose site of the concepts that are involved in each lab exercise.

It is possible to complete all of the lab exercises while totally ignoring all of the guidelines listed below. However, following the guidelines below will allow you to complete the lab exercises much more quickly and easily. You will get much more out of these labs and you will make fewer mistakes if you carefully follow these guidelines.

File Management: You will need to manage a large number of files for this course. This will involve copying and moving files back and forth between various folders, between the j:/ drive and the c:/ drive and your personal storage area (Onedrive and/or USB drive). You will need to take a look at file sizes and file creation dates. You can do this in a number of ways. The most common way involves using the "My Computer" icon.  In the guidelines below, I'll assume you are using "My Computer." but you may find a different way to do this.

Beginning a work session:

  1. Making space: At the beginning of any work session, it is a good idea to get in the habit of checking to make sure that there is sufficient free space on your hard drive. The c:/temp folder is the only place on your computer where you have "write permission." This simply means that the Windows operating system used on all the computers in the Spatial Analysis lab will not allow you to create a file in any other folder on these computers. This prevents you or anyone else from inadvertently corrupting any of the programs on these machines. There should be close to 1 Gbyte of free space on the hard drive. Confirm this by going to "My Computer" clicking once on the c:/ drive and going to File-Properties. If the free space is low, around 100 Mbytes or so, feel free to go to c:/temp and begin deleting files and folders. The c:/temp space is working space and anything left there can be considered abandoned junk files. You can and should delete these files to create the space you need to do your work.
  2. Make your own working folder: The c:/ temp folder will probably contain many files left there by other students. It is easy to get confused and lose track of which files are yours and which are leftovers. I always create a new folder for every new work session. Try to keep your folder names short but descriptive. Folder names should not contain any blank spaces and you should avoid using weird punctuation symbols.

Good examples of working folder names might include:
c:/temp/wallin,
c:/temp/wallin/rslab1
c:/temp/wallin/persiangulf
c:/temp/wallin/persian_gulf
c:/temp/wallin/persgulf

Bad examples of working folder names might include:
c:/temp/stuff  (What exactly is “stuff?”  Whose “stuff “ is it?) 
c:/temp/mine  (Whose “mine?”) 
c:/temp/persian gulf (note the blank space in this last one)
c:/temp/persian-gulf (note the use of the dash)
c:/temp/lab#1 (note the use of the # symbol).

Including your name in the directory structure is a particularly good idea. This is important because, with a folder name like c:/temp/persgulf, there is always the chance that someone else in the class may use this machine at a later date and mix up your persian gulf files with theirs. If you ignore my advice on this point and insist on working in c:/temp and commingling your files with the abandoned junk files left by others, I guarantee that you will make mistakes! You will waste hours and hours and hours of your time.  You want to start each and every work session with a clean empty working folder.

  1. Beginning a New Lab Exercise: All labs will begin by having you get a copy of one or more image files. I will make these files available to you on the j:/ drive under J:\saldata\esci442\labexercisename. Use "My Computer" to find this space go to View-Details to see the size of the file(s) you need. Single click on the file(s) (or the entire folder) you need and then go to Edit-Copy, then use "My Computer" to navigate back to your working space; for me, this would be c:/temp/wallin. Then go to Edit-Paste and a copy of this file (or folder) will be made in your working space. Important tip: When the copying process is complete, go to View-Details in your working space. Compare the file size for your copy to the file size of the original file in J:\saldata\esci442\labexercisename. If the file sizes do not match exactly then something went wrong. Check to make sure there was enough free space on the c:/ drive to hold the file. Make more space if necessary by deleting abandoned junk files, then delete your (incomplete) copy and go through the copy/paste function again. Count the files to make sure that all files you need got copied. If you are managing lots of files, it is easy to over look one and this may mean than an entire work session has been wasted. Another important reality check (that will be much more important below) is to take a look at the "Last Modified" date for your copy of this file. This will be visible when you go to View-Details. The date listed for your copy of the file should match the date and time listed for the source file. As soon as you make changes to this file, the date and time of these changes will be listed.
  2. Work on the file: Now that you have a copy of the file in your working folder, you can proceed with the lab. Your work with this file may involve adding additional image channels. Doing so will increase the size of your original file. You can monitor this by going back to "My Computer" from time to time to take a look at the file size. You may also create supplementary files, such as models. These should be stored in the same working folder with your image.
  3. Tracking Files: Naming conventions: You should develop consistent habits when it comes to selecting file names. Try to keep filenames short but descriptive. File names like "junk" and "stuff" aren't terribly helpful. A filename like "persgulf" or "bakerbay" is more descriptive. Many files will have file extensions that will help you keep track of what type of file they are. Sometimes you have a choice about these file names and sometimes you don't. In ERDAS, all image files will have a .img extension. ENVI does not automatically give image files a .img extension, but I’d strongly recommend that you get in the habit of giving all of your image files this extension anyway!  So, your Persian Gulf image might have a file name like persgulf.img and your Baker to Bay image might have a name like bakerbay2000.img. You will also be creating "models" in ERDAS. These are series of commands that perform various operations on an image channel. You will need to name these models. I’m pretty sure that ERDAS, by default, gives these files an extension of .gmd (these are “graphical models,” hence the extension).  You may be able to over-ride this and use another extension, but I'd strongly recommend use the default .gmd filename extension. This will help you recognize these files an ERDAS models. One of the early labs has you create a land/water mask. A good file name for this model might be landmask.gmd. Again, store these models in the same working folder with the image files they will be applied to.
  4. Taking a break; Ending a Work Session: You will probably not be able to finish a lab exercise during a single work session. You definitely want to save your work so you don't have to start over the next time you come in. This is straightforward, however, failure to approach this in a systematic and consistent manner will make it more likely that you will lose your work and waste many hours of time! You should be saving your work to your own personal storage area, BOTH your Onedrive AND your USB drive. Begin the process of saving your work by using "My Computer to check the size of each of your files in your working folder; in my case, this would be all of the files in c:/temp/wallin. Now use "My Computer" to see how much free space you have on your personal storage area. If you don't have enough free space in your personal storage area, you will need to delete some files or find another option (maybe get another USB drive).  You should get in the habit of having a backup.  This is why it is a very good idea to have a USB drive in addition to your space on the Onedrive.  If you don't have a place to store your files, someone may delete your files from c:/temp between now and your next work session.  Assuming you have free space available somewhere, begin by making a new folder for this lab exercise. This will help to keep your files organized. Now use the Copy-Paste function to copy all of your files from c:/temp/wallin to the appropriate folder on your Onedrive or USB drive (or both!). The folder on your Onedrive might be: u:/persgulf or perhaps u:/envr442_lab1. Confirm that the copy/paste worked!!!!! To do this, go to the appropriate folder on your Onedrive and go to View-Details to view the File Size and the Modified date. If the file size on the U:\ drive or USB drive does not match the file size on c:/temp/wallin, then something went wrong! Figure out what happened and do the copy/paste again until the file sizes match. The "Modified" date indicated the most recent date and time that the file was modified in some way. Make sure that the date listed under for this file on your Onedrive matches the date and time listed for this file on c:/temp/wallin. If it doesn't then something went wrong!
  5. Sources of Confusion: Many labs will take several work sessions to complete. In these cases, your U-drive or USB drive will contain an "old" version of all your files for a given lab. When you copy/paste your "newest" version of these files from c:/temp/wallin to u:/envr442_lab1, you need to be sure that you overwrite the old files. The operating system will ask you if you are sure you want to do this. Think about this carefully. Then think about it a bit more. You can overwrite the old file if you want, but if you made a mistake in today's work session (maybe your second or third work session on this lab) you may need to go back to square one and start over to recover! You might create a separate folder on your zip disk for each new work session (u:/envr442_lab1a, u:/envr442_lab1b,…) if you are particularly paranoid or if there is a great deal of time and work at stake. This will take up lots of disk space quickly so this approach may not always be practical. On the other hand, computer storages space is relatively cheap and your time is very, very, very valuable! On the larger projects, it is a good idea to have a copy of your work stored in two different places (your Onedrive AND your USB drive). This way, if one storage area gets corrupted, you will still have a backup. Alternatively, if you feel confident that what you have done in the current work session is correct, or if you are short on disk space, you will need to overwrite your "old" version of all files. When the operating system asks you if you want to overwrite your files, say "yes to all." If it doesn't ask you this question, and if you feel that you have old versions of files that it should be overwriting, then something went wrong! Compare the file sizes of your files on c:/temp/wallin and u:/envr442_lab1. They should be identical and the creation date for the files on your zip disk should match the current date and time. Get in the habit of always always always comparing the file sizes and checking the creation dates for your files after you save things to your zip disk. If you don't move your new files to your Onedrive properly, you will have wasted an entire work session!
  6. Starting a New Work Session; Moving files from your Onedrive or USB drive back to the hard disk: Start this process by going to c:/temp and making sure there is enough free space on the disk for you to work. If there isn't, start erasing things in c:/temp to make space. After you have cleared out sufficient working space, make yourself a new working directory following the same guidelines described in Part 2 above. Use "My Computer" to check the sizes of the files you need from your Onedrive or USB drive, then use the Copy-Paste function to move a copy of these files to your new work space under c:/temp/wallin (or whatever you choose to call your working directory). After the Copy-Paste is complete, compare the file sizes on your zip drive to the size of the copy you just made under c:/temp/wallin. If the file sizes don't match, then something went wrong with the Copy-Paste. Also look at the creation date for the new copy of the files you just put on c:/temp/wallin. If the "Last Modified" dates for these files do not match the date and time listed for the source files on your zip disk, then something went wrong. After you have a copy of the files moved from your zip disk to c:/temp/wallin and you have confirmed that the Copy-Paste function worked properly, you are ready to start a new work session.
  7. Can’t I just work directly off the Onedrive?  Why bother moving the files back and forth all the time?  I know that it is tempting to just work directly off your Onedrive or your USB drive.  There are two reasons that this is NOT a good habit to get into.  The first is speed.  Every time you want to access a file, the computer needs to perform a read/write function.  It turns out that accessing a file on your Onedrive involves transferring data over a network to some other computer located across campus.  This is much much slower than accessing files that are located on the hard drive of the computer on which you are working.  Also, when you access a file across a network, sometimes the network has a hiccup and the file can get corrupted.  If you are working with your only copy of the file, you will have just lost a great deal of work and a great deal of time.  The second reason that working directly from your Onedrive or USB drive is a bad idea is that you always want to have a backup.  If you are working with your only copy of a file and you do something wrong, you may lose all of your previous work and you will need to start over.  If you are working with a copy of your files on c:/temp , then the worst that can happen is that you lose your most recent work.

 Here is a visual representation of what I’ve just described:

 

Gulf_War* is the folder containing files that were modified during work session A

Gulf_War** is the folder containing files that were modified during work session B



Return to ESCI 442/542 Lab Page

Return to ESCI 442/542 Syllabus

Return to David Wallin's Home Page