コード例 #1
0
ファイル: forward_model.py プロジェクト: ben-bougher/modelr
def add_arguments(parser):
    
    default_parser_list = [
                           'base1','base2','overlay1','overlay2',
                           'opacity', 'colourmap','f','theta'
                           ]
    
    default_parsers(parser,default_parser_list)
    
    parser.add_argument('model',
                        type=earth_model_type, 
                        help='earth model',
                        required=True
                        )
                        
    parser.add_argument('twt_range',
                        type=float, 
                        action='list', 
                        help='Range of two-way-time [ms] for earth model',
                        required=True,
                        default='0,1000'
                        )
                        
    parser.add_argument('wiggle_skips',
                        type=int,
                        help='number of traces to skip in display',
                        required = True, 
                        default = 10,
                        )

    parser.add_argument('tslice',
                        type=float, 
                        help='time [ms] along which to plot instantaneous amplitude ',
                        required=True,
                        default=150
                        )
                      
    parser.add_argument('scale',
                        type=float,
                        action='list', 
                        help='0 for auto scale, and (optional) clip percentile (e.g. 99)',
                        required=True,
                        default='1.0,99'
                        )
                        
    parser.add_argument('aspect_ratio',
                        type=float,
                        help='vertical stretch for output dimensions, < 1 = squash, > 1 = stretch',
                        required=True,
                        default='1.0'
                        )
                        
    parser.add_argument('fs',
                        type=int,
                        help='fontsize',
                        required=True,
                        default='10'
                        )

    return parser
コード例 #2
0
def add_arguments(parser):
    default_parser_list = ["base1", "base2", "overlay1", "overlay2", "opacity", "theta", "colourmap"]

    default_parsers(parser, default_parser_list)

    parser.add_argument(
        "Rock0", type=rock_properties_type, help="Upper rock type", required=True, default="2000,1000,2200"
    )

    parser.add_argument(
        "Rock1", type=rock_properties_type, help="Channel rock type", required=True, default="2200,1100,2300"
    )

    parser.add_argument(
        "Rock2", type=rock_properties_type, help="Lower rock type", required=False, default="2500,1200,2600"
    )
    parser.add_argument("trace", type=int, help="Trace location", required=False, default=150)

    parser.add_argument(
        "xscale", type=int, help=("0 for linear, 2 for log base 2, " + "10 for log Base 10"), required=True, default="0"
    )

    parser.add_argument(
        "tslice",
        type=float,
        help=("time [ms] along which to plot " + "instantaneous amplitude"),
        required=True,
        default=150,
    )

    return parser
コード例 #3
0
ファイル: channel_spatial.py プロジェクト: xian-ran/modelr
def add_arguments(parser):
    default_parser_list = [
        'base1', 'base2', 'overlay1', 'overlay2', 'opacity', 'f', 'theta',
        'colourmap'
    ]

    default_parsers(parser, default_parser_list)

    parser.add_argument('Rock0',
                        type=rock_properties_type,
                        help='Upper rock type',
                        required=True,
                        default='2000,1000,2200')

    parser.add_argument('Rock1',
                        type=rock_properties_type,
                        help='Rock type of the channel',
                        required=True,
                        default='2200,1100,2300')

    parser.add_argument('Rock2',
                        type=rock_properties_type,
                        help='Lower rock type',
                        required=False,
                        default='2500,1200,2600')

    parser.add_argument(
        'tslice',
        type=float,
        help='time [ms] along which to plot instantaneous amplitude ',
        required=True,
        default=150)

    return parser
コード例 #4
0
ファイル: forward_model.py プロジェクト: xian-ran/modelr
def add_arguments(parser):

    default_parser_list = [
        'base1', 'base2', 'overlay1', 'overlay2', 'opacity', 'colourmap', 'f',
        'theta'
    ]

    default_parsers(parser, default_parser_list)

    parser.add_argument('model',
                        type=earth_model_type,
                        help='earth model',
                        required=True)

    parser.add_argument('twt_range',
                        type=float,
                        action='list',
                        help='Range of two-way-time [ms] for earth model',
                        required=True,
                        default='0,1000')

    parser.add_argument(
        'wiggle_skips',
        type=int,
        help='number of traces to skip in display',
        required=True,
        default=10,
    )

    parser.add_argument(
        'tslice',
        type=float,
        help='time [ms] along which to plot instantaneous amplitude ',
        required=True,
        default=150)

    parser.add_argument(
        'scale',
        type=float,
        action='list',
        help='0 for auto scale, and (optional) clip percentile (e.g. 99)',
        required=True,
        default='1.0,99')

    parser.add_argument(
        'aspect_ratio',
        type=float,
        help=
        'vertical stretch for output dimensions, < 1 = squash, > 1 = stretch',
        required=True,
        default='1.0')

    parser.add_argument('fs',
                        type=int,
                        help='fontsize',
                        required=True,
                        default='10')

    return parser
コード例 #5
0
def add_arguments(parser):

    default_parser_list = [
        'base1', 'base2', 'overlay1', 'overlay2', 'opacity', 'f', 'theta'
    ]

    default_parsers(parser, default_parser_list)

    parser.add_argument('Rock0',
                        type=rock_properties_type,
                        help='Rock properties of upper rock ' + '[Vp,Vs, rho]',
                        required=True,
                        default='2000,1000,2200')

    parser.add_argument('Rock1',
                        type=rock_properties_type,
                        help='Rock properties of middle rock ' +
                        '[Vp, Vs, rho]',
                        required=True,
                        default='2200,1100,2300')

    parser.add_argument('Rock2',
                        type=rock_properties_type,
                        help='Rock properties of lower rock ' +
                        '[Vp, Vs, rho]',
                        required=False,
                        default='2500,1200,2600')

    parser.add_argument('RGB blend',
                        type=bool,
                        help='True or False',
                        required=True,
                        default=True)

    parser.add_argument('red channel',
                        type=int,
                        help='lower dom freq for RGB blend' + '[Hz]',
                        required=True,
                        default='10')

    parser.add_argument('green ghannel',
                        type=int,
                        help='lower dom freq for RGB blend' + '[Hz]',
                        required=True,
                        default='20')

    parser.add_argument('blue channel',
                        type=int,
                        help='lower dom freq for RGB blend' + '[Hz]',
                        required=True,
                        default='40')

    return parser
コード例 #6
0
ファイル: channel_wavelet.py プロジェクト: nyleng/modelr
def add_arguments(parser):
    default_parser_list = [
                           'base1','base2','overlay1','overlay2',
                           'opacity', 'theta','colourmap'
                           ]
    
    default_parsers(parser,default_parser_list)
    
    parser.add_argument('Rock0',
                        type=rock_properties_type, 
                        help='Upper rock type',
                        required=True,
                        default='2000,1000,2200'
                        )
                        
    parser.add_argument('Rock1',
                        type=rock_properties_type, 
                        help='Channel rock type',
                        required=True,
                        default='2200,1100,2300'
                        )
    
    parser.add_argument('Rock2',
                        type=rock_properties_type, 
                        help='Lower rock type',
                        required=False,
                        default='2500,1200,2600'
                        )
    parser.add_argument('trace',
                        type=int, 
                        help='Trace location',
                        required=False,
                        default=150
                        )

    parser.add_argument('xscale',
                        type=int, 
                        help='0 for linear, 2 for log base 2, 10 for log Base 10', 
                        required=True,
                        default='0'
                        )
                        
    parser.add_argument('tslice',
                        type=float, 
                        help='time [s] along which to plot instantaneous amplitude ',
                        required=True,
                        default=0.150
                        )


                        
    return parser
コード例 #7
0
ファイル: wedge_spatial.py プロジェクト: nyleng/modelr
def add_arguments(parser):
    
    default_parser_list = [
                           'base1','base2','overlay1','overlay2',
                           'opacity', 'colourmap','f','theta'
                           ]
    
    default_parsers(parser,default_parser_list)
    
    parser.add_argument('Rock0',
                        type=rock_properties_type, 
                        help='Rock properties of upper rock '+
                        '[Vp,Vs, rho]',
                        required=True,
                        default='2000,1000,2200'
                        )
                        
    parser.add_argument('Rock1',
                        type=rock_properties_type, 
                        help='Rock properties of middle rock ' +
                        '[Vp, Vs, rho]',
                        required=True,
                        default='2200,1100,2300'
                        )
    
    parser.add_argument('Rock2',
                        type=rock_properties_type, 
                        help='Rock properties of lower rock ' +
                        '[Vp, Vs, rho]',
                        required=False,
                        default='2500,1200,2600'
                        )

    parser.add_argument('tslice',
                        type=float, 
                        help='time [s] along which to plot instantaneous amplitude ',
                        required=True,
                        default=0.150
                        )
                      
    parser.add_argument('scale',
                        type=float,
                        action='list', 
                        help='0 for auto scale, and (optional) clip percentile (e.g. 99)',
                        required=True,
                        default='1.0,99'
                        )

    return parser
コード例 #8
0
def add_arguments(parser):
    default_parser_list = [
        'base1', 'base2', 'overlay1', 'overlay2', 'opacity', 'theta',
        'colourmap'
    ]

    default_parsers(parser, default_parser_list)

    parser.add_argument('Rock0',
                        type=rock_properties_type,
                        help='Upper rock type',
                        required=True,
                        default='2000,1000,2200')

    parser.add_argument('Rock1',
                        type=rock_properties_type,
                        help='Channel rock type',
                        required=True,
                        default='2200,1100,2300')

    parser.add_argument('Rock2',
                        type=rock_properties_type,
                        help='Lower rock type',
                        required=False,
                        default='2500,1200,2600')
    parser.add_argument('trace',
                        type=int,
                        help='Trace location',
                        required=False,
                        default=150)

    parser.add_argument('xscale',
                        type=int,
                        help=('0 for linear, 2 for log base 2, ' +
                              '10 for log Base 10'),
                        required=True,
                        default='0')

    parser.add_argument('tslice',
                        type=float,
                        help=('time [ms] along which to plot ' +
                              'instantaneous amplitude'),
                        required=True,
                        default=150)

    return parser
コード例 #9
0
def add_arguments(parser):

    default_parser_list = [
        'base1', 'base2', 'overlay1', 'overlay2', 'opacity', 'colourmap', 'f',
        'theta'
    ]

    default_parsers(parser, default_parser_list)

    parser.add_argument('Rock0',
                        type=rock_properties_type,
                        help='Rock properties of upper rock ' + '[Vp,Vs, rho]',
                        required=True,
                        default='2000,1000,2200')

    parser.add_argument('Rock1',
                        type=rock_properties_type,
                        help='Rock properties of middle rock ' +
                        '[Vp, Vs, rho]',
                        required=True,
                        default='2200,1100,2300')

    parser.add_argument('Rock2',
                        type=rock_properties_type,
                        help='Rock properties of lower rock ' +
                        '[Vp, Vs, rho]',
                        required=False,
                        default='2500,1200,2600')

    parser.add_argument(
        'tslice',
        type=float,
        help='time [ms] along which to plot instantaneous amplitude ',
        required=True,
        default=150)

    parser.add_argument(
        'scale',
        type=float,
        action='list',
        help='0 for auto scale, and (optional) clip percentile (e.g. 99)',
        required=True,
        default='1.0,99')

    return parser
コード例 #10
0
ファイル: modelr_plot.py プロジェクト: nyleng/modelr
def add_arguments(parser):

    default_parser_list = [
                           'title',
                           'colourmap',
                           'wiggle_skips',
                           'aspect_ratio',
                           'base1','base2','overlay1','overlay2',
                           'opacity'
                           ]
    
    default_parsers(parser,default_parser_list)

    parser.add_argument('f',
                        type=float,
                        default=10.0,
                        help="Wavelet CF to use for cross section")

    parser.add_argument('theta',
                        type=float,
                        default=20.0,
                        help="Offset angle to use for cross section")
    
    parser.add_argument('slice',
                        type=str,
                        help='Slice to return',
                        default='spatial',
                        choices=['spatial', 'angle', 'frequency']
                        )
                        
    parser.add_argument('trace',
                        type=int,
                        help='Trace to use for non-spatial cross section',
                        default=150
                        )
    
    parser.add_argument('tslice',
                        type=float, 
                        help='time [s] along which to plot instantaneous amplitude ',
                        required=True,
                        default=0.050
                        )

    return parser
コード例 #11
0
ファイル: channel_spatial.py プロジェクト: nyleng/modelr
def add_arguments(parser):
    default_parser_list = [
                           'base1','base2','overlay1','overlay2',
                           'opacity','f', 'theta','colourmap'
                           ]
    
    default_parsers(parser,default_parser_list)
    
    parser.add_argument('Rock0',
                        type=rock_properties_type, 
                        help='Upper rock type',
                        required=True,
                        default='2000,1000,2200'
                        )
                        
    parser.add_argument('Rock1',
                        type=rock_properties_type, 
                        help='Rock type of the channel',
                        required=True,
                        default='2200,1100,2300'
                        )
    
    parser.add_argument('Rock2',
                        type=rock_properties_type, 
                        help='Lower rock type',
                        required=False,
                        default='2500,1200,2600'
                        )
    
    parser.add_argument('tslice',
                        type=float, 
                        help='time [s] along which to plot instantaneous amplitude ',
                        required=True,
                        default=0.151
                        )
                        


                        
    return parser
コード例 #12
0
def add_arguments(parser):
    default_parser_list = ["base1", "base2", "overlay1", "overlay2", "opacity", "f", "colourmap"]

    default_parsers(parser, default_parser_list)

    parser.add_argument(
        "Rock0", type=rock_properties_type, help="Upper rock type", required=True, default="2000,1000,2200"
    )

    parser.add_argument(
        "Rock1", type=rock_properties_type, help="Rock type of the wedge", required=True, default="2200,1100,2300"
    )

    parser.add_argument(
        "Rock2", type=rock_properties_type, help="Lower rock type", required=False, default="2500,1200,2600"
    )
    parser.add_argument("trace", type=int, help="Trace location", required=False, default=150)

    parser.add_argument(
        "tslice", type=float, help="time [ms] along which to plot instantaneous amplitude ", required=True, default=150
    )

    return parser
コード例 #13
0
def add_arguments(parser):
    
    default_parser_list = ['ntraces',
                           'reflectivity_method',
                           'title',
                           'theta',
                           'f',
                           'colourmap',
                           'wavelet',
                           'wiggle_skips',
                           'base1','base2','overlay1','overlay2',
                           'opacity', 'aspect_ratio'
                           
                           ]
    
    default_parsers(parser,default_parser_list)
    
                        
    parser.add_argument('Rock0',
                        type=rock_properties_type, 
                        help='Rock properties of rock 0 [Vp,Vs, rho]',
                        required=True,
                        default='2350,1150,2400'
                        )
                        
    parser.add_argument('Rock1',
                        type=rock_properties_type, 
                        help='Rock properties of rock 1 [Vp, Vs, rho]',
                        required=True,
                        default='2150,1050,2300'
                        )
    
    parser.add_argument('Rock2',
                        type=rock_properties_type, 
                        help='Rock properties of rock 2 [Vp, Vs, rho]',
                        required=False,
                        default='2500,1250,2600'
                        )
    
    parser.add_argument('Rock3',
                        type=rock_properties_type, 
                        help='Rock properties of rock 3 [Vp, Vs, rho]',
                        required=False,
                        default='2600,1350,2700'
                        )
    
    parser.add_argument('url',
                        type=str, 
                        help='a URL for an image with 3 colours',
                        required=True,
                        default='http://www.subsurfwiki.org/mediawiki/images/4/41/Modelr_test_ellipse.png'
                        )
    
    parser.add_argument('rocks',
                        type=int, 
                        help='the number of rocks in the model',
                        required=False
                        )
    
    parser.add_argument('minimum',
                        type=int, 
                        help='the minimum impedance (or use Rocks)',
                        required=False
                        )
    
    parser.add_argument('maximum',
                        type=int, 
                        help='the maximum impedance (or use Rocks)',
                        required=False
                        )

    parser.add_argument('slice',
                        type=str,
                        help='Slice to return',
                        default='spatial',
                        choices=['spatial', 'angle', 'frequency']
                        )
                        
    parser.add_argument('trace',
                        type=int,
                        help='Trace to use for non-spatial slice',
                        default=0
                        )
    
    return parser
コード例 #14
0
ファイル: body_lab.py プロジェクト: xian-ran/modelr
def add_arguments(parser):

    default_parser_list = [
        'ntraces', 'pad', 'reflectivity_method', 'title', 'theta', 'f',
        'colourmap', 'wavelet', 'wiggle_skips', 'aspect_ratio', 'base1',
        'base2', 'overlay1', 'overlay2', 'opacity'
    ]

    default_parsers(parser, default_parser_list)

    parser.add_argument('Rock0',
                        type=rock_properties_type,
                        help='Rock properties of upper rock ' + '[Vp,Vs, rho]',
                        required=True,
                        default='2000,1000,2200')

    parser.add_argument('Rock1',
                        type=rock_properties_type,
                        help='Rock properties of middle rock ' +
                        '[Vp, Vs, rho]',
                        required=True,
                        default='2200,1100,2300')

    parser.add_argument('Rock2',
                        type=rock_properties_type,
                        help='Rock properties of lower rock ' +
                        '[Vp, Vs, rho]',
                        required=False,
                        default='2500,1200,2600')

    parser.add_argument('left',
                        type=int,
                        action='list',
                        default='0,0',
                        help='The thickness on the left-hand side')

    parser.add_argument('right',
                        type=int,
                        action='list',
                        default='0,50',
                        help='The thickness on the right-hand side')

    parser.add_argument('margin',
                        type=int,
                        help='Traces with zero thickness',
                        default=1)

    parser.add_argument('slice',
                        type=str,
                        help='Slice to return',
                        default='spatial',
                        choices=['spatial', 'angle', 'frequency'])

    parser.add_argument('trace',
                        type=int,
                        help='Trace to use for non-spatial slice',
                        default=150)

    parser.add_argument(
        'tslice',
        type=float,
        help='time [ms] along which to plot instantaneous amplitude ',
        required=True,
        default=50)

    return parser
コード例 #15
0
def add_arguments(parser):
    
    default_parser_list = [
                           'base1','base2','overlay1','overlay2',
                           'opacity','f', 'theta'
                           ]
    
    default_parsers(parser,default_parser_list)
    
    parser.add_argument('Rock0',
                        type=rock_properties_type, 
                        help='Rock properties of upper rock '+
                        '[Vp,Vs, rho]',
                        required=True,
                        default='2000,1000,2200'
                        )
                        
    parser.add_argument('Rock1',
                        type=rock_properties_type, 
                        help='Rock properties of middle rock ' +
                        '[Vp, Vs, rho]',
                        required=True,
                        default='2200,1100,2300'
                        )
    
    parser.add_argument('Rock2',
                        type=rock_properties_type, 
                        help='Rock properties of lower rock ' +
                        '[Vp, Vs, rho]',
                        required=False,
                        default='2500,1200,2600'
                        )

    parser.add_argument('RGB blend',
                        type=bool, 
                        help='True or False',
                        required=True,
                        default=True
                        )    
    
    parser.add_argument('red channel',
                        type=int, 
                        help='lower dom freq for RGB blend' +
                        '[Hz]',
                        required=True,
                        default='10'
                        )
                        
    parser.add_argument('green ghannel',
                        type=int, 
                        help='lower dom freq for RGB blend' +
                        '[Hz]',
                        required=True,
                        default='20'
                        )
                        
    parser.add_argument('blue channel',
                        type=int, 
                        help='lower dom freq for RGB blend' +
                        '[Hz]',
                        required=True,
                        default='40'
                        )

                        
    return parser
コード例 #16
0
ファイル: body_lab.py プロジェクト: agile-geoscience/modelr
def add_arguments(parser):
    
    default_parser_list = ['ntraces',
                           'pad',
                           'reflectivity_method',
                           'title',
                           'theta',
                           'f',
                           'colourmap',
                           'wavelet', 
                           'wiggle_skips',
                           'aspect_ratio',
                           'base1','base2','overlay1','overlay2',
                           'opacity'
                           ]
    
    default_parsers(parser,default_parser_list)
    
    parser.add_argument('Rock0',
                        type=rock_properties_type, 
                        help='Rock properties of upper rock '+
                        '[Vp,Vs, rho]',
                        required=True,
                        default='2000,1000,2200'
                        )
                        
    parser.add_argument('Rock1',
                        type=rock_properties_type, 
                        help='Rock properties of middle rock ' +
                        '[Vp, Vs, rho]',
                        required=True,
                        default='2200,1100,2300'
                        )
    
    parser.add_argument('Rock2',
                        type=rock_properties_type, 
                        help='Rock properties of lower rock ' +
                        '[Vp, Vs, rho]',
                        required=False,
                        default='2500,1200,2600'
                        )
    
    parser.add_argument('left',
                        type=int,
                        action='list',
                        default='0,0',                        
                        help='The thickness on the left-hand side'
                        )
                        
    parser.add_argument('right',
                        type=int,
                        action='list',
                        default='0,50',                        
                        help='The thickness on the right-hand side'
                        )
                        
    parser.add_argument('margin',
                        type=int,
                        help='Traces with zero thickness',
                        default=1
                        )

    parser.add_argument('slice',
                        type=str,
                        help='Slice to return',
                        default='spatial',
                        choices=['spatial', 'angle', 'frequency']
                        )
                        
    parser.add_argument('trace',
                        type=int,
                        help='Trace to use for non-spatial slice',
                        default=150
                        )
    
    parser.add_argument('tslice',
                        type=float, 
                        help='time [ms] along which to plot instantaneous amplitude ',
                        required=True,
                        default=50
                        )
    
    return parser
コード例 #17
0
ファイル: url_lab.py プロジェクト: agile-geoscience/modelr
def add_arguments(parser):

    default_parser_list = [
        "ntraces",
        "reflectivity_method",
        "title",
        "theta",
        "f",
        "colourmap",
        "wavelet",
        "wiggle_skips",
        "base1",
        "base2",
        "overlay1",
        "overlay2",
        "opacity",
        "aspect_ratio",
    ]

    default_parsers(parser, default_parser_list)

    parser.add_argument(
        "Rock0",
        type=rock_properties_type,
        help="Rock properties of rock 0 [Vp,Vs, rho]",
        required=True,
        default="2350,1150,2400",
    )

    parser.add_argument(
        "Rock1",
        type=rock_properties_type,
        help="Rock properties of rock 1 [Vp, Vs, rho]",
        required=True,
        default="2150,1050,2300",
    )

    parser.add_argument(
        "Rock2",
        type=rock_properties_type,
        help="Rock properties of rock 2 [Vp, Vs, rho]",
        required=False,
        default="2500,1250,2600",
    )

    parser.add_argument(
        "Rock3",
        type=rock_properties_type,
        help="Rock properties of rock 3 [Vp, Vs, rho]",
        required=False,
        default="2600,1350,2700",
    )

    parser.add_argument(
        "url",
        type=str,
        help="a URL for an image with 3 colours",
        required=True,
        default="http://www.subsurfwiki.org/mediawiki/images/4/41/Modelr_test_ellipse.png",
    )

    parser.add_argument("rocks", type=int, help="the number of rocks in the model", required=False)

    parser.add_argument("minimum", type=int, help="the minimum impedance (or use Rocks)", required=False)

    parser.add_argument("maximum", type=int, help="the maximum impedance (or use Rocks)", required=False)

    parser.add_argument(
        "slice", type=str, help="Slice to return", default="spatial", choices=["spatial", "angle", "frequency"]
    )

    parser.add_argument("trace", type=int, help="Trace to use for non-spatial slice", default=0)

    return parser