Note, this tutorial assumes you have already worked with form
editing and understand the basics of adding, moving, deleting, and changing
the appearances of fields. If you have not, please review the
editing
forms "howto".
One of the main improvements of the new StarView version 6 program over its predecessor is the ability to create new forms. To start a new form simply click on the New button in StarView. You will be presented with both a new blank form
and the custom query generation tool:
The custom query generation tool is the tool you will use to find fields in the databases and add them to the new form. There are four different ways of displaying information on a form. The first two, the field and the area, are the same as was seen in the original xstarview, a single line and multiline text box displaying information about the currently selected record. The other two, the table and list, display a scrollable list of all the retrieved records fields. Here are examples of all four in action:
As you see the text field and text area display the current records
information while the other two display a scrollable and selectable list
of the information for all the retrieved records. You can select a record
by clicking on its entry in the table or list box. Hence they give you
the ability to look at selected fields from the search side by side and
select which record you want to view in full.
It is a good idea to use the custom query generation tool to look through the database you will be using to find the fields you want to add before you add them. Remember you can only use a single database to do queries and joins between different databases are not valid. I.e. looking at the tool above you see in the right hand side that the five databases are catalog, cdbs, iue, other_sci_data, and proposaldb. On any single form you can use any field found in the tables listed below these entries, but you cannot mix entries that are found in the different databases.
To view the tables and entries found in a database simply click on the expand tree icon to the right of the folder. This will expand the tree/folders content. Here we have clicked on the catalog and the archvie_data_set_all expand tree icons to find the entries within the archive_data_set_all table. Note that tables and databases are represented by folders while entries in a database are represented by document icons.
When you find an entry that may be of interest, you can get more information about that entry by right clicking on it selecting the "Get Entry Details" menu item. Note also that this menu will allow you to add the item to the current form. Selecting the "Get Entry Details" item will display a popup with the information from the database about this entry
Here we see that this entry was from the catalog database table archve_data_set_all, that is is named ads_archive_class, that it will be labeled by default as Archive Class:, that it contains characters, that is logical type is archiveclass, that is has not associated fields (an example of an associated field would be dec to ra), and that there are many different three letter acronyms for what is displayed in this field (which are shown in the help text region of the too). Much of this information can be useful when designing a form.
Another way to find fields is to use the Custom query generation tool's search capability. An example of how to use this is that you are interested in wavelength information. So you want to find all fields with wavelength in their definition. So you enter wavelength in the search box and select definition and click SEARCH. Here you can also right click any element and view the database details, or add the field to the current form.
Adding text field, text areas, and lists add single components to the bottom of the form. Components can be moved by left clicking on the label and dragging them to where the should be on the form. After adding a field, it is a good idea to move it near where you want it, so as to keep the fields from piling up at the bottom of the form. To add a field to the form or to a selected table (see next paragraph), first select the type of thing you wish to add (text field, table, list, or text arean) by clicking on that button at the top of the tool, right click on what you want to add (in either the search table or the folder tree listing) and select Add Item.
Tables are a little more complex. If a table is selected it has a blue box around it
If the Table button is selected on the Custom query generation tool, fields you add will be added to this table. To create a new table simply deselect the table and add a field. You can have as many tables as you desire on a form. Note also you can add fields to tables that are also found in other components (in the above window we could add Central Wavelength to the table by clicking on Table in the custom query generation tool and selecting the sci_central_wavelegth item again.
To remove an item from a table, right click its header item and select Delete Column. Delete Component will delete the entire table, or item from the form. If no refrerences to that field exist on the form, the item will also be removed from the qualifiers.
To change the size of an item on the for, select the items properties by right clicking on its label. For example, we only want to display 5 lines at at a time of the Proposal Title and we want to label it with something more descriptive so we right click on the label, select "Properties..." from the popup menu and get the following window:
Presented are all the things you can change about this item. You can apply changes to see how they appear on the form. Once you are happy, click OK to dismiss this tool. You can then move fields around on the form to tidy up.
Some notes on aligning items. If you stick to having labels widths be integral numbers of say 10 pixels wide, the window will help you align things to a grid of 5 pixels when you have the SNAP window in SNAP mode (as shown above in the status bar at the bottom of the window). To move into a freehand alignment mode (where things move on a pixel by pixel basis) simply click snap, changing it to FREE mode. Thus you can align things however you want them.
This form is looking good. Many people will be quite happy with this form as it stands. However you may want to rearrange the table. You can do so by clicking and moving things in the table header. For example if we want Target Name to be first on the table simply click somewhere in the header for that column and drag it to the start of the table. You can resize columns by clicking on the separator to the right of the column header and dragging the column to be the size you want. After doing this we might have a table that looks like this
Note that tables can be wider than their viewable area, as scroll bars will appear when needed to be able to navigate around the table.
The last region to be edited are the qualifiers. You can rearange the order of qualifiers in the table by right clicking the qualifier you wish to move and selecting any of the move options in the popup menu
Next we do a simple search to make sure the form works (just click search and make sure you get something that is not an error message), and save it to disk by clicking the save button. We recomend that you must save this form within the svdata directory on your computer, as this is the directory that the Search menu looks at to load local forms to the search menu.. This is the directory the save file dialog starts in. You can create subfolders and save into those, but saving forms outside of the svdata directory hide it from StarView and thus will make it unavailable via the Searches menu (you will have to use the Open Local Form menu item and browse to the form with the load dialog).
One item not discussed here is the label item. You can add labels to forms when the form is in edit mode by right clicking on the form outside of other items and selecting the "New Label" menu item. This will put a label called "New Label" at the location where you clicked. You can now move that around the same way you moved other items and change its properties by selecting "Properties..." from its popup menu (this is how you make it say something other than new label).
Finally, a sometimes useful "trick". You may want to create a table of information for the current record similar to what is seen in the reference files screens
These are simply a combination of labels to mark the rows and columns and text fields with zero width labels arranged in a table. These can be very useful for displaying information about the different calibration files and methods that can be used to reduce the data, or displaying other related data in a compact easy to digest space.
To be safe, click Edit button in the status bar to make the form STATIC (to prevent you from ruining your well formatted form with spurious clicks) and you are ready to browse the archives with your new personalized form. Note this will remove most editing functionallity from menus including moving items in the qualifier form and changing field widths and labels. To be able to edit thie form again you click the STATIC button (the default mode for any loaded form) and the form will be in EDIT mode. You will need to save any changes to the form to have them available the next time you load the form
To then save the form, click on the Save button and follow the dialogs. Be sure to save the form somewhere in your svdata directory (the file save dialog will start up in that directory). Saving outside of this directory tree will result in the form not appearing in the Searches menu and thus the form will not be loadable without using the Open Local Form menu item under file and browsing to the file. Think of this SVData directory as containing bookmarked local forms and save things there.
To share a form with someone else, you need only tell them where the form is stored. They can either load it with the Open Local Form menu, if they can get to that form from their local machine, they can copy the form to their own workspace, or make a symbolic link to the file in their SVDATA directory (a good method of bookmarking other local forms). If the user is remote, the file will need to be transferred to the other site. Note this is a binary file and must be transferred accordingly, either with a binary transfer in ftp, rcp, or scp, or as an encoded mail attachment. Simply saying
mail joe@bigscience.net < briliantform.crvwill result in the file being corrupted by the mailer (as it assumes it is text) and confusion on the part of joe.
Finally, if you create a form that you and other people cannot live
without, please tell us here at archive@stsci.edu
and we will look into adding it to our set of served forms.