subpulse/pipelines/pipeline.py
def run(
    event: int,
    arrivals: list,
    chi: float,
    simulations: int,
    fingerprint: int = int(time.time()),
    cluster: bool = False,
    job: int = 0,
    debug: bool = False,
) -> None:
    """Run single-thread subpulse analysis."""
    if os.environ.get("DEBUG", False) or debug:
        log.setLevel(logging.DEBUG)
    else:
        log.setLevel(logging.ERROR)

    click.echo("Running Subpulse TOA Analysis")
    click.echo(f"Parameters : {locals()}")
    click.echo(f"Fingerprint: {fingerprint}")
    click.echo(f"Log Level: {logging.getLevelName(log.level)}")

    if cluster:
        base_path = Path(
            f"/data/chime/intensity/processed/subpulse/{event}/{fingerprint}"
        )
        base_path.mkdir(parents=True, exist_ok=True)
        filename = f"mc_{event}_nsim{simulations}_chi%.2f_{job}.npz" % chi

    else:
        base_path = Path.cwd() / f"{event}/{fingerprint}"
        base_path.mkdir(parents=True, exist_ok=True)
        filename = f"mc_{event}_nsim{simulations}_chi%.2f_{job}.npz" % chi

    log.debug(f"Base Path: {base_path}")
    log.debug(f"Filename : {filename}")
    savepath = base_path.absolute().joinpath(filename)
    log.debug("TOA Analysis: Started...")
    toa.execute(arrivals, chi, simulations, savepath, debug)
    log.debug("TOA Analysis: Completed")
Run single-thread subpulse analysis.
Run single-thread subpulse analysis.
Run single - thread subpulse analysis .
def run(
    event: int,
    arrivals: list,
    chi: float,
    simulations: int,
    fingerprint: int = int(time.time()),
    cluster: bool = False,
    job: int = 0,
    debug: bool = False,
) -> None:
    if os.environ.get("DEBUG", False) or debug:
        log.setLevel(logging.DEBUG)
    else:
        log.setLevel(logging.ERROR)
    click.echo("Running Subpulse TOA Analysis")
    click.echo(f"Parameters : {locals()}")
    click.echo(f"Fingerprint: {fingerprint}")
    click.echo(f"Log Level: {logging.getLevelName(log.level)}")
    if cluster:
        base_path = Path(
            f"/data/chime/intensity/processed/subpulse/{event}/{fingerprint}"
        )
        base_path.mkdir(parents=True, exist_ok=True)
        filename = f"mc_{event}_nsim{simulations}_chi%.2f_{job}.npz" % chi
    else:
        base_path = Path.cwd() / f"{event}/{fingerprint}"
        base_path.mkdir(parents=True, exist_ok=True)
        filename = f"mc_{event}_nsim{simulations}_chi%.2f_{job}.npz" % chi
    log.debug(f"Base Path: {base_path}")
    log.debug(f"Filename : {filename}")
    savepath = base_path.absolute().joinpath(filename)
    log.debug("TOA Analysis: Started...")
    toa.execute(arrivals, chi, simulations, savepath, debug)
    log.debug("TOA Analysis: Completed")
def run ( event : int , arrivals : list , chi : float , simulations : int , fingerprint : int = int ( time . time ( ) ) , cluster : bool = False , job : int = 0 , debug : bool = False , ) -> None : if os . environ . get ( "DEBUG" , False ) or debug : log . setLevel ( logging . DEBUG ) else : log . setLevel ( logging . ERROR ) click . echo ( "Running Subpulse TOA Analysis" ) click . echo ( f"Parameters : {locals()}" ) click . echo ( f"Fingerprint: {fingerprint}" ) click . echo ( f"Log Level: {logging.getLevelName(log.level)}" ) if cluster : base_path = Path ( f"/data/chime/intensity/processed/subpulse/{event}/{fingerprint}" ) base_path . mkdir ( parents = True , exist_ok = True ) filename = f"mc_{event}_nsim{simulations}_chi%.2f_{job}.npz" % chi else : base_path = Path . cwd ( ) / f"{event}/{fingerprint}" base_path . mkdir ( parents = True , exist_ok = True ) filename = f"mc_{event}_nsim{simulations}_chi%.2f_{job}.npz" % chi log . debug ( f"Base Path: {base_path}" ) log . debug ( f"Filename : {filename}" ) savepath = base_path . absolute ( ) . joinpath ( filename ) log . debug ( "TOA Analysis: Started..." ) toa . execute ( arrivals , chi , simulations , savepath , debug ) log . debug ( "TOA Analysis: Completed" )
Run single-thread subpulse analysis.
Run single - thread subpulse analysis .
"""Run single-thread subpulse analysis."""
event
int
arrivals
list
chi
float
simulations
int
fingerprint
int
cluster
bool
job
int
debug
bool