Ejemplo n.º 1
0
def populate(fromda):
    """Rapidly scan the archive filenames and find Network/Stations"""
    if fromda:
        logging.info("Overriding workflow...")
        from ..msnoise_table_def import DataAvailability
        from ..api import update_station
        db = connect()
        stations = db.query(DataAvailability.net, DataAvailability.sta). \
            group_by(DataAvailability.net, DataAvailability.sta)

        for net, sta in stations:
            print('Adding:', net, sta)
            X = 0.0
            Y = 0.0
            altitude = 0.0
            coordinates = 'UTM'
            instrument = 'N/A'
            update_station(db,
                           net,
                           sta,
                           X,
                           Y,
                           altitude,
                           coordinates=coordinates,
                           instrument=instrument)
    else:
        from ..s002populate_station_table import main
        main()
Ejemplo n.º 2
0
def station_map(ctx, show, outfile):
    """Plots the station map (very very basic)"""
    if ctx.obj['MSNOISE_custom']:
        from station_map import main
    else:
        from ..plots.station_map import main
    main(show, outfile)
Ejemplo n.º 3
0
def station_map(ctx, show, outfile):
    """Plots the station map (very very basic)"""
    if ctx.obj['MSNOISE_custom']:
        from station_map import main
    else:
        from ..plots.station_map import main
    main(show, outfile)
Ejemplo n.º 4
0
def scan_archive(ctx, init, path, recursively):
    """Scan the archive and insert into the Data Availability table."""
    if path:
        logging.info("Overriding workflow...")
        from obspy import UTCDateTime
        from ..s01scan_archive import worker
        db = connect()
        startdate = UTCDateTime(get_config(db, "startdate"))
        enddate = UTCDateTime(get_config(db, "enddate"))
        cc_sampling_rate = float(get_config(db, "cc_sampling_rate"))
        db.close()
        if recursively:
            for root, dirs, _ in os.walk(path):
                for d in dirs:
                    tmppath = os.path.join(root, d)
                    _ = os.listdir(tmppath)
                    if not len(_):
                        continue
                    worker(sorted(_),
                           tmppath,
                           startdate,
                           enddate,
                           cc_sampling_rate,
                           init=True)
        worker(sorted(os.listdir(path)),
               path,
               startdate,
               enddate,
               cc_sampling_rate,
               init=True)
    else:
        from ..s01scan_archive import main
        main(init, threads=ctx.obj['MSNOISE_threads'])
Ejemplo n.º 5
0
def install():
    """DEPRECATED: This command launches the installer."""
    click.echo(
        'DEPRECATED command since MSNoise 1.6, please use "msnoise init"'
        ' instead')
    from ..s000installer import main
    main()
Ejemplo n.º 6
0
def data_availability(ctx, show, outfile):
    """Plots the Data Availability vs time"""
    if ctx.obj['MSNOISE_custom']:
        from data_availability import main
    else:
        from ..plots.data_availability import main
    main(show, outfile)
Ejemplo n.º 7
0
def data_availability(ctx, show, outfile):
    """Plots the Data Availability vs time"""
    if ctx.obj['MSNOISE_custom']:
        from data_availability import main
    else:
        from ..plots.data_availability import main
    main(show, outfile)
Ejemplo n.º 8
0
def config_gui():
    """
    Run the deprecated configuration GUI tool.  Please use the configuration
    web interface using 'msnoise admin' instead.
    """
    from ..s001configurator import main
    click.echo("Let's Configure MSNoise !")
    main()
Ejemplo n.º 9
0
def distance(ctx, filterid, comp, ampli, show, outfile, refilter,
             virtual_source):
    """Plots the REFs of all pairs vs distance"""
    if ctx.obj['MSNOISE_custom']:
        from distance import main
    else:
        from ..plots.distance import main
    main(filterid, comp, ampli, show, outfile, refilter, virtual_source)
Ejemplo n.º 10
0
def mwcs(ctx, sta1, sta2, filterid, comp, mov_stack, show, outfile):
    """Plots the mwcs results between sta1 and sta2 (parses the CCFs)\n
    STA1 and STA2 must be provided with this format: NET.STA !"""
    if ctx.obj['MSNOISE_custom']:
        from mwcs import main
    else:
        from ..plots.mwcs import main
    main(sta1, sta2, filterid, comp, mov_stack, show, outfile)
Ejemplo n.º 11
0
def config_gui():
    """
    Run the deprecated configuration GUI tool.  Please use the configuration
    web interface using 'msnoise admin' instead.
    """
    from ..s001configurator import main
    click.echo("Let's Configure MSNoise !")
    main()
Ejemplo n.º 12
0
def interferogram(ctx, sta1, sta2, filterid, comp, mov_stack, show, outfile,
                  refilter):
    """Plots the interferogram between sta1 and sta2 (parses the CCFs)\n
    STA1 and STA2 must be provided with this format: NET.STA !"""
    if ctx.obj['MSNOISE_custom']:
        from interferogram import main
    else:
        from ..plots.interferogram import main
    main(sta1, sta2, filterid, comp, mov_stack, show, outfile, refilter)
Ejemplo n.º 13
0
def dtt(ctx, sta1, sta2, filterid, day, comp, mov_stack, show, outfile):
    """Plots a graph of dt against t\n
    STA1 and STA2 must be provided with this format: NET.STA !\n
    DAY must be provided in the ISO format: YYYY-MM-DD"""
    if ctx.obj['MSNOISE_custom']:
        from dtt import main
    else:
        from ..plots.dtt import main
    main(sta1, sta2, filterid, comp, day, mov_stack, show, outfile)
Ejemplo n.º 14
0
def ccftime(ctx, sta1, sta2, filterid, comp, mov_stack, ampli, seismic, show,
            outfile, envelope, refilter):
    """Plots the ccf vs time between sta1 and sta2 (parses the dt/t results)\n
    STA1 and STA2 must be provided with this format: NET.STA !"""
    if ctx.obj['MSNOISE_custom']:
        from ccftime import main
    else:
        from ..plots.ccftime import main
    main(sta1, sta2, filterid, comp, mov_stack, ampli, seismic, show, outfile,
         envelope, refilter)
Ejemplo n.º 15
0
def config(set, sync):
    """This command should now only be used to use the command line to set
    a parameter value in the data base. It used to launch the Configurator but
    the recommended way to configure MSNoise is to use the "msnoise admin" web
    interface."""
    if set:
        from ..default import default
        if not set.count("="):
            click.echo("!! format of the set command is name=value !!")
            return
        name, value = set.split("=")
        if name not in default:
            click.echo("!! unknown parameter %s !!" % name)
            return
        from ..api import connect, update_config
        db = connect()
        update_config(db, name, value)
        db.commit()
        db.close()
        click.echo("Successfully updated parameter %s = %s" % (name, value))
    elif sync:
        import glob
        from ..api import connect, get_config, get_stations, update_station,\
            preload_instrument_responses

        db = connect()
        responses = preload_instrument_responses(db)
        netsta = []
        for id, row in responses.iterrows():
            net, sta, loc, chan = row["channel_id"].split(".")
            netsta.append("%s.%s" % (net, sta))
        responses["netsta"] = netsta

        for station in get_stations(db):
            id = "%s.%s" % (station.net, station.sta)
            coords = responses[responses["netsta"] == id]
            lon = float(coords["longitude"].values[0])
            lat = float(coords["latitude"].values[0])
            update_station(
                db,
                station.net,
                station.sta,
                lon,
                lat,
                0,
                "DEG",
            )
            logging.info("Added coordinates (%.5f %.5f) for station %s.%s" %
                         (lon, lat, station.net, station.sta))
        db.close()

    else:
        from ..s001configurator import main
        click.echo('Let\'s Configure MSNoise !')
        main()
Ejemplo n.º 16
0
def mwcs(ctx, sta1, sta2, filterid, comp, mov_stack, show, outfile):
    """Plots the mwcs results between sta1 and sta2 (parses the CCFs)\n
    STA1 and STA2 must be provided with this format: NET.STA !"""
    if sta1 > sta2:
        click.echo("Stations STA1 and STA2 must be sorted alphabetically.")
        return
    if ctx.obj['MSNOISE_custom']:
        from mwcs import main
    else:
        from ..plots.mwcs import main
    main(sta1, sta2, filterid, comp, mov_stack, show, outfile)
Ejemplo n.º 17
0
def mwcs(ctx, sta1, sta2, filterid, comp, mov_stack, show, outfile):
    """Plots the mwcs results between sta1 and sta2 (parses the CCFs)\n
    STA1 and STA2 must be provided with this format: NET.STA !"""
    if sta1 > sta2:
        click.echo("Stations STA1 and STA2 must be sorted alphabetically.")
        return
    if ctx.obj['MSNOISE_custom']:
        from mwcs import main
    else:
        from ..plots.mwcs import main
    main(sta1, sta2, filterid, comp, mov_stack, show, outfile)
Ejemplo n.º 18
0
def distance(ctx, filterid, comp, ampli, show, outfile, refilter,
             virtual_source, extra_args):
    """Plots the REFs of all pairs vs distance"""
    
        
        
    if ctx.obj['MSNOISE_custom']:
        from distance import main
    else:
        from ..plots.distance import main
    main(filterid, comp, ampli, show, outfile, refilter, virtual_source,
         **extra_args)
Ejemplo n.º 19
0
def dtt(ctx, sta1, sta2, filterid, day, comp, mov_stack, show, outfile):
    """Plots a graph of dt against t\n
    STA1 and STA2 must be provided with this format: NET.STA !\n
    DAY must be provided in the ISO format: YYYY-MM-DD"""
    if sta1 > sta2:
        click.echo("Stations STA1 and STA2 must be sorted alphabetically.")
        return
    if ctx.obj['MSNOISE_custom']:
        from dtt import main
    else:
        from ..plots.dtt import main
    main(sta1, sta2, filterid, comp, day, mov_stack, show, outfile)
Ejemplo n.º 20
0
def spectime(ctx, sta1, sta2, filterid, comp, mov_stack, ampli, show, outfile,
             refilter):
    """Plots the ccf's spectrum vs time between sta1 and sta2\n
    STA1 and STA2 must be provided with this format: NET.STA !"""
    if sta1 > sta2:
        click.echo("Stations STA1 and STA2 must be sorted alphabetically.")
        return
    if ctx.obj['MSNOISE_custom']:
        from spectime import main
    else:
        from ..plots.spectime import main
    main(sta1, sta2, filterid, comp, mov_stack, ampli, show, outfile, refilter)
Ejemplo n.º 21
0
def timing(ctx, mov_stack, comp, dttname, filterid, pair, all, show, outfile):
    """Plots the timing (parses the dt/t results)\n
    Individual pairs can be plotted extra using the -p flag one or more times.\n
    Example: msnoise plot timing -p ID_KWUI_ID_POSI\n
    Example: msnoise plot timing -p ID_KWUI_ID_POSI -p ID_KWUI_ID_TRWI\n
    Remember to order stations alphabetically !
    """
    if ctx.obj['MSNOISE_custom']:
        from timing import main
    else:
        from ..plots.timing import main
    main(mov_stack, dttname, comp, filterid, pair, all, show, outfile)
Ejemplo n.º 22
0
def timing(ctx, mov_stack, comp, dttname, filterid, pair, all, show, outfile):
    """Plots the timing (parses the dt/t results)\n
    Individual pairs can be plotted extra using the -p flag one or more times.\n
    Example: msnoise plot timing -p ID_KWUI_ID_POSI\n
    Example: msnoise plot timing -p ID_KWUI_ID_POSI -p ID_KWUI_ID_TRWI\n
    Remember to order stations alphabetically !
    """
    if ctx.obj['MSNOISE_custom']:
        from timing import main
    else:
        from ..plots.timing import main
    main(mov_stack, dttname, comp, filterid, pair, all, show, outfile)
Ejemplo n.º 23
0
def dtt(ctx, sta1, sta2, filterid, day, comp, mov_stack, show, outfile):
    """Plots a graph of dt against t\n
    STA1 and STA2 must be provided with this format: NET.STA !\n
    DAY must be provided in the ISO format: YYYY-MM-DD"""
    if sta1 > sta2:
        click.echo("Stations STA1 and STA2 must be sorted alphabetically.")
        return
    if ctx.obj['MSNOISE_custom']:
        from dtt import main
    else:
        from ..plots.dtt import main
    main(sta1, sta2, filterid, comp, day, mov_stack, show, outfile)
Ejemplo n.º 24
0
def new_jobs(init, nocc, hpc=""):
    """Determines if new CC jobs are to be defined"""
    if not hpc:
        from ..s02new_jobs import main
        main(init, nocc)
    if hpc:
        from ..api import connect
        left, right = hpc.split(":")
        db = connect()
        db.execute(
            "INSERT INTO jobs (pair, day, jobtype, flag) SELECT pair, day, '%s', 'T' from jobs where jobtype='%s' and flag='D';"
            % (right, left))
        db.commit()
        db.close()
Ejemplo n.º 25
0
def ccftime(ctx, sta1, sta2, filterid, comp, mov_stack, ampli, seismic, show,
            outfile, envelope, refilter, extra_args):
    """Plots the ccf vs time between sta1 and sta2\n
    STA1 and STA2 must be provided with this format: NET.STA !"""
    if extra_args:
        extra_args = parse_extra_args(extra_args)

    if sta1 > sta2:
        click.echo("Stations STA1 and STA2 must be sorted alphabetically.")
        return
    if ctx.obj['MSNOISE_custom']:
        from ccftime import main
    else:
        from ..plots.ccftime import main
    main(sta1, sta2, filterid, comp, mov_stack, ampli, seismic, show, outfile,
         envelope, refilter, **extra_args)
Ejemplo n.º 26
0
def spectime(ctx, sta1, sta2, filterid, comp, mov_stack,
            ampli, show, outfile, refilter, extra_args):
    """Plots the ccf's spectrum vs time between sta1 and sta2\n
    STA1 and STA2 must be provided with this format: NET.STA !"""
    
        

    if sta1 > sta2:
        click.echo("Stations STA1 and STA2 must be sorted alphabetically.")
        return
    if ctx.obj['MSNOISE_custom']:
        from spectime import main
    else:
        from ..plots.spectime import main
    main(sta1, sta2, filterid, comp, mov_stack, ampli, show, outfile,
         refilter, **extra_args)
Ejemplo n.º 27
0
def interferogram(ctx, sta1, sta2, filterid, comp, mov_stack, show, outfile,
                  refilter, extra_args):
    """Plots the interferogram between sta1 and sta2 (parses the CCFs)\n
    STA1 and STA2 must be provided with this format: NET.STA !"""
    
        

    if sta1 > sta2:
        click.echo("Stations STA1 and STA2 must be sorted alphabetically.")
        return
    if ctx.obj['MSNOISE_custom']:
        from interferogram import main
    else:
        from ..plots.interferogram import main
    main(sta1, sta2, filterid, comp, mov_stack, show, outfile, refilter,
         **extra_args)
Ejemplo n.º 28
0
def interferogram(ctx, sta1, sta2, filterid, comp, mov_stack, show, outfile,
                  refilter, extra_args):
    """Plots the interferogram between sta1 and sta2 (parses the CCFs)\n
    STA1 and STA2 must be provided with this format: NET.STA !"""
    if extra_args:
        extra_args = parse_extra_args(extra_args)

    if sta1 > sta2:
        click.echo("Stations STA1 and STA2 must be sorted alphabetically.")
        return
    if ctx.obj['MSNOISE_custom']:
        from interferogram import main
    else:
        from ..plots.interferogram import main
    main(sta1, sta2, filterid, comp, mov_stack, show, outfile, refilter,
         **extra_args)
Ejemplo n.º 29
0
def compute_cc2(ctx):
    """Computes the CC jobs (based on the "New Jobs" identified)"""
    from ..s03compute_no_rotation import main
    from multiprocessing import Process
    threads = ctx.obj['MSNOISE_threads']
    delay = ctx.obj['MSNOISE_threadsdelay']
    if threads == 1:
        main()
    else:
        processes = []
        for i in range(threads):
            p = Process(target=main)
            p.start()
            processes.append(p)
            time.sleep(delay)
        for p in processes:
            p.join()
Ejemplo n.º 30
0
def new_jobs(init, nocc, hpc=""):
    """Determines if new CC jobs are to be defined"""
    if not hpc:
        from ..s02new_jobs import main
        main(init, nocc)
    if hpc:
        from ..api import connect, read_db_inifile
        dbini = read_db_inifile()
        prefix = (dbini.prefix + '_') if dbini.prefix != '' else ''
        left, right = hpc.split(':')
        db = connect()
        db.execute("INSERT INTO {prefix}jobs (pair, day, jobtype, flag) "
                   "SELECT pair, day, '{right_type}', 'T' FROM {prefix}jobs "
                   "WHERE jobtype='{left_type}' AND flag='D';"
                   .format(prefix=prefix, right_type=right, left_type=left))
        db.commit()
        db.close()
Ejemplo n.º 31
0
def compute_mwcs(ctx):
    """Computes the MWCS based on the new stacked data"""
    from ..s05compute_mwcs import main
    threads = ctx.obj['MSNOISE_threads']
    delay = ctx.obj['MSNOISE_threadsdelay']
    if threads == 1:
        main()
    else:
        from multiprocessing import Process
        processes = []
        for i in range(threads):
            p = Process(target=main)
            p.start()
            processes.append(p)
            time.sleep(delay)
        for p in processes:
            p.join()
Ejemplo n.º 32
0
def new_jobs(init, nocc, hpc=""):
    """Determines if new CC jobs are to be defined"""
    if not hpc:
        from ..s02new_jobs import main
        main(init, nocc)
    if hpc:
        from ..api import connect, read_db_inifile
        dbini = read_db_inifile()
        prefix = (dbini.prefix + '_') if dbini.prefix != '' else ''
        left, right = hpc.split(':')
        db = connect()
        db.execute("INSERT INTO {prefix}jobs (pair, day, jobtype, flag) "
                   "SELECT pair, day, '{right_type}', 'T' FROM {prefix}jobs "
                   "WHERE jobtype='{left_type}' AND flag='D';".format(
                       prefix=prefix, right_type=right, left_type=left))
        db.commit()
        db.close()
Ejemplo n.º 33
0
def compute_cc2(ctx):
    """Computes the CC jobs (based on the "New Jobs" identified)"""
    from ..s03compute_no_rotation import main
    threads = ctx.obj['MSNOISE_threads']
    delay = ctx.obj['MSNOISE_threadsdelay']
    loglevel = ctx.obj['MSNOISE_verbosity']
    if threads == 1:
        main(loglevel=loglevel)
    else:
        from multiprocessing import Process
        processes = []
        for i in range(threads):
            p = Process(target=main, kwargs={"loglevel": loglevel})
            p.start()
            processes.append(p)
            time.sleep(delay)
        for p in processes:
            p.join()
Ejemplo n.º 34
0
def compute_dtt(ctx, interval):
    """Computes the dt/t jobs based on the new MWCS data"""
    from ..s06compute_dtt import main
    threads = ctx.obj['MSNOISE_threads']
    delay = ctx.obj['MSNOISE_threadsdelay']
    loglevel = ctx.obj['MSNOISE_verbosity']
    if threads == 1:
        main(loglevel=loglevel)
    else:
        from multiprocessing import Process
        processes = []
        for i in range(threads):
            p = Process(target=main, kwargs={"loglevel": loglevel})
            p.start()
            processes.append(p)
            time.sleep(delay)
        for p in processes:
            p.join()
Ejemplo n.º 35
0
def compute_cc(ctx):
    """Computes the CC jobs (based on the "New Jobs" identified)"""
    from ..s03compute_cc import main
    threads = ctx.obj['MSNOISE_threads']
    delay = ctx.obj['MSNOISE_threadsdelay']
    loglevel = ctx.obj['MSNOISE_verbosity']
    if threads == 1:
        main(loglevel=loglevel)
    else:
        from multiprocessing import Process
        processes = []
        for i in range(threads):
            p = Process(target=main, kwargs={"loglevel": loglevel})
            p.start()
            processes.append(p)
            time.sleep(delay)
        for p in processes:
            p.join()
Ejemplo n.º 36
0
def compute_dtt(ctx, interval):
    """Computes the dt/t jobs based on the new MWCS data"""
    from ..s06compute_dtt import main
    threads = ctx.obj['MSNOISE_threads']
    delay = ctx.obj['MSNOISE_threadsdelay']
    loglevel = ctx.obj['MSNOISE_verbosity']
    if threads == 1:
        main(loglevel=loglevel)
    else:
        from multiprocessing import Process
        processes = []
        for i in range(threads):
            p = Process(target=main, kwargs={"loglevel": loglevel})
            p.start()
            processes.append(p)
            time.sleep(delay)
        for p in processes:
            p.join()
Ejemplo n.º 37
0
def populate(fromda):
    """Rapidly scan the archive filenames and find Network/Stations"""
    if fromda:
        logging.info("Overriding workflow...")
        db = connect()
        stations = db.query(DataAvailability.net, DataAvailability.sta). \
            group_by(DataAvailability.net, DataAvailability.sta)

        for net, sta in stations:
            print('Adding:', net, sta)
            X = 0.0
            Y = 0.0
            altitude = 0.0
            coordinates = 'UTM'
            instrument = 'N/A'
            update_station(db, net, sta, X, Y, altitude,
                           coordinates=coordinates, instrument=instrument)
    else:
        from ..s002populate_station_table import main
        main()
Ejemplo n.º 38
0
def stack(ctx, ref, mov, step):
    """Stacks the [REF] and/or [MOV] windows"""
    click.secho('Lets STACK !', fg='green')
    from ..s04stack import main
    threads = ctx.obj['MSNOISE_threads']
    delay = ctx.obj['MSNOISE_threadsdelay']
    loglevel = ctx.obj['MSNOISE_verbosity']
    if threads == 1:
        if ref:
            main('ref', loglevel=loglevel)
        if mov:
            main('mov', loglevel=loglevel)
        if step:
            main('step', loglevel=loglevel)
    else:
        from multiprocessing import Process
        processes = []
        if ref:
            for i in range(threads):
                p = Process(target=main,
                            args=[
                                "ref",
                            ],
                            kwargs={"loglevel": loglevel})
                p.start()
                processes.append(p)
                time.sleep(delay)
        for p in processes:
            p.join()
        if mov:
            for i in range(threads):
                p = Process(target=main,
                            args=[
                                "mov",
                            ],
                            kwargs={"loglevel": loglevel})
                p.start()
                processes.append(p)
                time.sleep(delay)
        for p in processes:
            p.join()
        if step:
            for i in range(threads):
                p = Process(target=main,
                            args=[
                                "step",
                            ],
                            kwargs={"loglevel": loglevel})
                p.start()
                processes.append(p)
                time.sleep(delay)
        for p in processes:
            p.join()
Ejemplo n.º 39
0
def stack(ctx, ref, mov, step):
    """Stacks the [REF] and/or [MOV] windows"""
    click.secho('Lets STACK !', fg='green')
    from ..s04stack import main
    threads = ctx.obj['MSNOISE_threads']
    delay = ctx.obj['MSNOISE_threadsdelay']
    loglevel = ctx.obj['MSNOISE_verbosity']
    if threads == 1:
        if ref:
            main('ref', loglevel=loglevel)
        if mov:
            main('mov', loglevel=loglevel)
        if step:
            main('step', loglevel=loglevel)
    else:
        from multiprocessing import Process
        processes = []
        if ref:
            for i in range(threads):
                p = Process(target=main, args=["ref",],
                            kwargs={"loglevel": loglevel})
                p.start()
                processes.append(p)
                time.sleep(delay)
        for p in processes:
            p.join()
        if mov:
            for i in range(threads):
                p = Process(target=main, args=["mov",],
                            kwargs={"loglevel": loglevel})
                p.start()
                processes.append(p)
                time.sleep(delay)
        for p in processes:
            p.join()
        if step:
            for i in range(threads):
                p = Process(target=main, args=["step",],
                            kwargs={"loglevel": loglevel})
                p.start()
                processes.append(p)
                time.sleep(delay)
        for p in processes:
            p.join()
Ejemplo n.º 40
0
def init(tech):
    """This command initializes the current folder to be a MSNoise Project
    by creating a database and a db.ini file."""
    click.echo('Launching the init')
    from ..s000installer import main
    main(tech)
Ejemplo n.º 41
0
def compute_stretching():
    """[experimental] Computes the stretching based on the new stacked data"""
    from ..stretch import main
    main()
Ejemplo n.º 42
0
def admin(port):
    from ..msnoise_admin import main
    main(port)
Ejemplo n.º 43
0
def test(prefix):
    """Runs the test suite, should be executed in an empty folder!"""
    import matplotlib.pyplot as plt
    plt.switch_backend("agg")
    from ..test.tests import main
    main(prefix=prefix)
Ejemplo n.º 44
0
def compute_stretching():
    """[experimental] Computes the stretching based on the new stacked data"""
    from ..stretch import main
    main()
Ejemplo n.º 45
0
def bugreport(ctx, sys, modules, env, all):
    """This command launches the Bug Report script."""
    click.echo('Let\'s Bug Report MSNoise !')
    # click.echo('Working on %i threads' % ctx.obj['MSNOISE_threads'])
    from ..bugreport import main
    main(sys, modules, env, all)
Ejemplo n.º 46
0
def test(prefix):
    """Runs the test suite, should be executed in an empty folder!"""
    import matplotlib.pyplot as plt
    plt.switch_backend("agg")
    from ..test.tests import main
    main(prefix=prefix)
Ejemplo n.º 47
0
def bugreport(ctx, sys, modules, env, all):
    """This command launches the Bug Report script."""
    click.echo('Let\'s Bug Report MSNoise !')
    # click.echo('Working on %i threads' % ctx.obj['MSNOISE_threads'])
    from ..bugreport import main
    main(sys, modules, env, all)
Ejemplo n.º 48
0
def admin(port):
    """Starts the Web Admin on http://localhost:5000 by default"""
    from ..msnoise_admin import main
    main(port)
Ejemplo n.º 49
0
def init(tech):
    """This command initializes the current folder to be a MSNoise Project
    by creating a database and a db.ini file."""
    click.echo('Launching the init')
    from ..s000installer import main
    main(tech)