Skip to content

Instantly share code, notes, and snippets.

@davelyon
Created July 8, 2010 17:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davelyon/468350 to your computer and use it in GitHub Desktop.
Save davelyon/468350 to your computer and use it in GitHub Desktop.
#
# Describing An Event:
#
# Define the image and movie classes:
class EventNameMovieAIA094_AIA131 < Movie
# Add up to 3 layers
#
# Parameters:
# id - the source id from Helioviewer of the image layer you'd like to add. See http://helioviewer.org/api/index.php?action=getDataSources for listing
# visible - this is required by the API, but you should always set this to :true (Note: the preceding colon is required)
# opacity - layer opacity (0 to 100)
#
layer :id => 1, :visible => :true, :opacity => 100
layer :id => 7, :visible => :true, :opacity => 40
# Optional: Specify the number of frames, default: let API decide
number_of_frames 100
# Optional: Specify the framerate, default: 8 frames/second
framerate 8
# Optional: Specify a list of formats from choices: :ipod, :mp4, :mov, :avi
output_formats :ipod, :mp4, :mov, :avi
# Optional: Use event end time, default: will not use event end time
use_event_end_time :true
# Optional: Backdate the timestamp by some amount of time
# time can be positive or negative to move forward or backward in time
backdate_start_time :hours => 0, :minutes => 15, :seconds => 30
# Optional: Specify event timeframe -- that is, specify a time after the event start time at which to end the movie
end_movie_after :hours => 12, :minutes => 12, :seconds => 59
end
class EventNameImageAIA131 < Image
# Add any number of layers
#
# Parameters:
# id - the source id from Helioviewer of the image layer you'd like to add. See http://helioviewer.org/api/index.php?action=getDataSources for listing
# visible - this is required by the API, but you should always set this to :true (Note: the preceding colon is required)
# opacity - layer opacity (0 to 100)
#
layer :id => 9, :visible => :true, :opacity => 100
# Image Scale - use to specift the image scale. This defaults to 0.6 assuming using AIA data
scale 0.6
end
class EventNameImageAIA094_AIA131 < Image
# Add any number of layers
#
# Parameters:
# id - the source id from Helioviewer of the image layer you'd like to add. See http://helioviewer.org/api/index.php?action=getDataSources for listing
# visible - this is required by the API, but you should always set this to :true (Note: the preceding colon is required)
# opacity - layer opacity (0 to 100)
#
layer :id => 8, :visible => :true, :opacity => 100
layer :id => 9, :visible => :true, :opacity => 40
# Image Scale - use to specift the image scale. This defaults to 0.6 assuming using AIA data
scale 0.6
end
class EventName < HelioEvent
has_image EventNameImageAIA131
has_image EventNameImageAIA094_AIA131
has_movie EventNameMovieAIA094_AIA131
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment