-
Notifications
You must be signed in to change notification settings - Fork 1
Home
You will need Tcl/Tk, the Perl module for Tk, and the Perl module Image::Grab; both of these modules are available on CPAN.
#Menu System ##File Menu ###Load coords Load the file which conains the coordinates of the objects you wish to classify. The assumed format is "name,RA,DEC" without quotes, no spaces, and only one entry per line. The RA and DEC are in degrees, not sexagesimal.
###Load previous save Load the file which contains a listing of galaxies which have already been classified. This allows you to classify a large set of galaxies in chunks and resume where you last left off. The assumed format is "name,class" without quotes, no spaces, and only one entry per line.
###Load comparison Load a file which contains a list of galaxies and their classifications. This is useful for checking someone else's (or your own) classifications. The assumed format is "name,class" without quotes, no spaces, and only one entry per line.
###Save Save the classifications you have done in the current session. You will be prompted to specify an output file unless you loaded a previous save file. NOTE: The old save file will be clobbered and all of that information lost.
###Save As Save the classifications you have done in the current session. This is useful for making a new output file when you have loaded a previous save that you don't want to have clobbered.
###Save URL Save the URL to the SDSS image tool for the current object. This is really only useful on Macs where you cannot copy/paste from an X11 session.
###Quit Exit the program. It will prompt you to save if you made new or changed any existing classifications.
##Run Menu ###Classify -> New Start a new classification session. If you are doing your first set of classifications, this is what you want.
###Classify -> Continue This allows you to resume a previous classification session. You must load a previous save file in order for this to work.
###Compare -> New Start a new comparison session. If you are reviewing someone else's classifications for the first time, this is what you want.
###Compare -> Continue This allows you to resume a previous comparison session. You must load both a previous save file and a comparison file in order for this to work.
When you do a comparison, the comparison file determines which galaxies are shown. This means you may use a coordinate file which contains more galaxies than you wish to compare; alleviating the need to make a new coordinate file for each comparison. However, all objects in the comparison file must be in the coordinate file. In comparison mode, you may press the spacebar to agree with the current classification and advance to the next object.
###Reset Reset the classification session. This is most useful for doing multiple classifications in one session without having to exit the tool. You will be prompted to save any work before resetting.
##Navigate Menu ###Back Go to the previously-classified object.
###Resume Go to the next object which has not been classified. This is useful for resuming classification when you use "Back" or "Search".
###Search Search for an object by name.
Many of these features have a keyboard shortcut. It will be listed in the drop-down menu to the right of the text. On a Mac, "ctrl" really means the control key, not the command key. It should be noted that the name which is specified in the coordinate file is taken to be the name of the galaxy. Hence, the comparison file and the previous save files must have a name which matches in the coordinate file. An error is shown if it does not.
#The Interface
###Image This is just the standard image you get from the SDSS Image Tool. The image is centered on the galaxy.
###Name Label This shows the name of the galaxy as specified in the coordinate file. The numbers in parentheses show that I have classified 4 of 8,248 objects. I have a lot of work to do!
###Classification Tabs These are the possible classifications which you may specify for each object. Clicking on a classification will cause the next object in the input file to be displayed. You may use Navigate->Back to go back to the previous object, if you wish to change its classification. It is strongly recommended that you do not use different classifications from different tabs in a single session. However, you are allowed to do so.
###Zoom Change the zoom level. Technically, this changes the scaling (arcseconds/pixel).
###Options These are the standard options you get with the SDSS Image Tool. "Invert" inverts the colors, "label" puts on the RA/DEC labels, and "grid" shows the scaling grid centered on the galaxy.
###URL Box This is the URL for the SDSS Tool for this object. This is useful if you want to look at the object's spectrum. NOTE: You shouldn't use a spectrum to "help" you classify a galaxy's morphology!
#Using the Tool So now that you know what each piece does, how would you normally go about using the tool? The first thing to note is that there are two different modes: classification and comparison. In classification mode, you are assigning your own classifications to the objects. In comparison mode, you are looking at someone else's classifications and then determining whether or not you agree by specifying how you would classify the object.
###Classification Mode
- Load a coordinate file
The coordinate file contains the name, right-ascension, and declination of your object in degrees, not sexagesimal. This is the "master list" of the objects you want to classify.
-
Select run mode "classify" ###New In this mode, you are starting a classification from scratch. You only a need to specify a coordinate file, and you are ready. ###Continue In this mode, you are resuming your previous classification session. This is a convenience that allows you to classify your objects in arbitrary blocks without having to make lots of coordinate files or search through lots of already-classified galaxies. In order to use this mode, you will need to load a previous save file. See "Load previous save" under Menu System above for details.
-
Classify your objects
Zoom in and out, invert the colors, put up a grid, squint, stare, and cogitate your way through two, five hundred, or ten thousand galaxies.
- Save your work
You don't want to lose all of the work you just spent four hours doing, so save and save often. You can save at any time and as many times as you like in a single session.
###Comparison Mode
- Load a coordinate file
The coordinate file contains the name, right-ascension, and declination of your object in degrees, not sexagesimal. This is the "master list" of the objects you want to compare.
- Load comparison file
The comparison file is a listing of objects which someone else has classified (preferably using this tool). See "Load comparison file" under Menu System above for details.
-
Select run mode "compare" ###New In this mode, you are starting a comparison from scratch. You only a need to specify a coordinate file, and you are ready. ###Continue In this mode, you are resuming your previous comparison session. This is a convenience that allows you to compare your objects in arbitrary blocks without having to make lots of coordinate files or search through lots of already-compared galaxies. In order to use this mode, you will need to load a previous save file. See "Load previous save" under Menu System above for details.
-
Compare your objects
Zoom in and out, invert the colors, put up a grid, squint, stare, and cogitate your way through two, five hundred, or ten thousand galaxies.
- Save your work
You don't want to lose all of the work you just spent four hours doing, so save and save often. You can save at any time and as many times as you like in a single session.
Be sure to make backups of your files BEFORE you start using the tool. It is very likely the case that after staring at a screen for many hours, you won't remember which file had which data in it. File-naming conventions can help. For instance, your save file could be called "my_save_file.csv" and the comparison file from Bob could be called "comparison_bob.csv." If a file already exists, the tool will ask you if you are really sure you want to overwrite it. But it will only ask you once, so be sure you really don't need that file anymore.
##Updating the Tool It is STRONGLY recommended that you do not alter the tool unless you are certain of what you are doing. The coding of this tool involves advanced Perl techniques such as hash references, closures, callbacks, and Tk wizardry. If you are not comfortable programming in Perl, I suggest you ask someone who is before changing too much. That being said, the tool is quite configurable.
###Adding a new classification tab This will probably be the most common reason to update the tool. Fortunately, the process of doing so is fairly straightforward, but does require a bit of familiarity with layout schemes in graphical interfaces. You will first need to add two lines to the function "setupClassifierGrid" to make a new tab. Just below the two lines
$tabRef = $tabs->add('Mergers', '-label' => 'Mergers');
$tabs->pageconfigure('Mergers', '-raisecmd' => [\&loadMergerClassifierGrid, $tabRef]);
you may add your own tab. For instance, to add a new tab for interacting galaxies, I would do something like
$tabRef = $tabs->add('Interacting', '-label' => 'Interacting');
$tabs->pageconfigure('Interacting', '-raisecmd' => [\&loadInteractingClassifierGrid, $tabRef]);
This will make a new tab called "Interacting," but it will be empty. I have to then add a new function called "loadInteractingClassifierGrid" in order to get my radio buttons for the classifications. To do this, you may create the function anywhere in the GEGImageClassifier.pl script. However, I recommend keeping it next to the other load*ClassifierGrid functions just for neatness and maintainability.
The loadInteractingClassifierGrid function will take one parameter, the parent window, and it must then put all of the radiobuttons in a regular grid on the window. Here is an example of what the function might look like.
sub loadInteractingClassifierGrid
{
my $parent = shift;
my $row = 1;
$parent->Radiobutton(
-text => 'interacting',
-variable => \$classification,
-value => 'int',
-command => \&classifyImage_Click
)->grid(-sticky => 'nw', -row => $row, -column => 1, -columnspan => 2);
$row++;
$parent->Radiobutton(
-text => 'non-interacting',
-variable => \$classification,
-value => 'nint',
-command => \&classifyImage_Click
)->grid(-sticky => 'nw', -row => $row, -column => 3, -columnspan => 2);
$row++;
$parent->Radiobutton(
-text => 'possibly interacting',
-variable => \$classification,
-value => 'pint',
-command => \&classifyImage_Click
)->grid(-sticky => 'nw', -row => $row, -column => 5, -columnspan => 2);
}
For the most part, you will only need to change the -text, -value, -row, -column, and -columnspan values. The -text is the text that is shown on the window. The -value is the value that is stored in the save files. THIS VALUE MUST BE GLOBALLY UNIQUE. Be sure to check the other load*ClassifierGrid functions for values that are already taken.
The -row, -column values determine where the radiobutton will go horizontally and vertically, respectively, on a regular grid of squares. You can have a single column span multiple columns with the -columnspan option. I recommend using the $row variable in your layout function. It makes it much easier to configure groups of radiobuttons so that they will all be on the same row; incrementing the $row variable between rows.
I recommend reading a full tutorial on Tk layout handling. A quick Google search will give you a much better idea of how the grid layout works.