#! /usr/bin/ruby
# -*- coding: euc-jp -*-

# == オプション
#
# == USAGE
#   % calc_msf.rb
#
# == 履歴
# * 2014-10-11 石渡正樹 作成

require "/GFD_Dennou_Work3/momoko/SyncRotEarthRad/script/dcpam_with_timerange.rb"
require "getoptlong"        # for option_parse


## オプション解析
parser = GetoptLong.new
parser.set_options(
                   ###    global option   ###
                   ['--saturation_scheme',                      GetoptLong::REQUIRED_ARGUMENT],
                   ['--time_start',                      GetoptLong::REQUIRED_ARGUMENT],
                   ['--time_end',                      GetoptLong::REQUIRED_ARGUMENT],
                   ['--range_stream',                      GetoptLong::REQUIRED_ARGUMENT],
                   ['--cint_stream',                      GetoptLong::REQUIRED_ARGUMENT],
                   ['--wsn',                      GetoptLong::REQUIRED_ARGUMENT],
                   ['--prefix',                      GetoptLong::REQUIRED_ARGUMENT]
                   )
parser.each_option do |name, arg|
    eval "$OPT_#{name.sub(/^--/, '').gsub(/-/, '_')} = '#{arg}'"  # strage option value to $OPT_val
end

time_start = ($OPT_time_start||1).to_s
time_end = ($OPT_time_end||9999).to_s

calc_msf_save_with_timerange("./",time_start,time_end)

