STARS Uploader

Basic Description: Web-based file upload system that will handle transfers of .fits files from the user's computer to the STARS web server. The uploader will organize these images into the correct directories on the server.

Quickstart:

    • Access: Possible logins are "student" and "teacher"

Goals:

    • Minimum amount of code/files possible [CHECK]
    • Well-documented code [NEED]
    • Must be easy enough to understand that future students/educators can use/modify the system if needed. [NEED]
    • Self-contained [CHECK]
    • Minimize the number of dependencies used. (i.e. no obscure python libraries, etc., everything that runs the uploader must have a strong support base). [CHECK]
    • Design for long-term use (i.e. should work for years) [CHECK]

Ideas / Problems:

    • Some Images don't get uploaded (such as StoneEdge 2013-10-31 XXCyg images)
    • Images double in size (from 2 to 4MB) Question: Are they saved as 32bit instead of 16bit?
    • Success message: change message to file was uploaded to the new folder (not moved)
    • Cancel Button
    • Submit Button at the top of the page
    • Add FITS keyword EXPTIME to the list
    • Make the width of the field match the text in the columns
    • Add same keyword to all files (example a button like "copy first file value to all other files") - for Object and Observer
    • Generate Filename according to rules that contain telescope, object, date etc.

Typical Users (In order of importance):

    • Teachers/Educators/Students at Yerkes
    • Stone Edge Observatory Personnel
    • Astronomers/Professors at Yerkes

Languages Involved:

    • Python (for server-side .fits file editing/image information)
    • PHP: upload script, passes .fits header info to Python script
    • Javascript: FitsJS is used for client-side .fits manipulation (i.e. get header data)
    • HTML5 (for local file manipulation

Use case:

    1. User is presented with upload button.
    2. User chooses what files to upload.
    3. User presses "submit", is presented with table of image name and header data
    4. User adds/edits header data
    5. User presses "upload"
    6. PHP handles upload to server, moves file to requisite directory
    7. Python script edits each fits file, changing its header information and resaving it.

Instructions for use:

    1. Press "browse"
    2. Select files with ".fits" extension. Once all the files you want are selected, press "open."
    3. The site will generate and display a table containing important .fits header information.
    4. Edit the information you want to edit, including file name. Make sure every space is filled with the *correct* information.
    5. Press submit.
    6. The site will upload the images to a folder on the server. This folder path is determined by the information in the header. Each image is categorized and organized by this format: Observatory/Telescope/Year/Date/Object/filename.
    7. To view these images, log in to Mollify on STARS and find the file by using the path given to you by the uploader site.
    8. Reload the page if you want to upload more images.

=============OLD=============

"Use Case:

  1. User logs in.
  2. User is presented with upload button, which opens file browser/selection dialogue box.
  3. User chooses which files to upload (must be fits files, end with .fits).
  4. User can delete/add additional files to upload.
  5. User presses upload, is presented with upload status bar.
  6. After upload is finished, user presses next, goes to next page.
  7. User sees all uploaded files, is able to view header information for each. Also, if required header info is missing on certain files, the program will tell them which ones to edit. (Apply to all button is available).
  8. After edit/review, user presses "apply changes and continue" button, edit program on server makes the changes.
  9. Program uses certain .fits header information to organize images on the server, i.e. by observatory/telescope/year/yearmonthday/object
  10. User is presented with a page saying something along the lines of "upload complete, here is the URL to view these images" with a link to the images on STARS.
  11. User can upload more images or exit the page.

Basic Requirements:

  1. Upload photos to stars server.
  2. Edit .fits file headers.
  3. Organize images into web-accessible directory based on the header data.
  4. Have login page.
  5. Display Thumbnail Preview

Architecture:

  1. PHP - Handles HTML content generation. Used for: login, upload, framework for viewer/editor page, image transfer from server temp dir to server images dir.
  2. Python - handles .fits files. Used for: getting .fits header info, editing .fits header info, creating .png preview of .fits file, writing .fits files.
  3. PHP/Python Integration - PHP can parse Python output through the exec function."

=============OLD=============