Lv0_scp.py
def scp(obsid):
    """
    To securely copy the files from ciri onto /Volumes/Samsung_T5/NICER-data/

    obsid - Observation ID of the object of interest (10-digit str)
    """
    if type(obsid) != str:
        raise TypeError("ObsID should be a string!")

    obsid_dir = 'masonng@ciri.mit.edu:/nfs/ciri/nicer/decrypted/' + obsid
    nicer_dir = Lv0_dirs.NICER_DATADIR

    if os.path.isdir(nicer_dir+obsid): #to prevent duplicate files ; not likely to be the case, but just in case...
        subprocess.run(['rm','-r',nicer_dir+obsid])

    subprocess.run(['scp','-r',obsid_dir,nicer_dir])
    subprocess.run(['rm','-r',nicer_dir + obsid + '/auxil/ni' + str(obsid) + '.cat'])

    return

    To securely copy the files from ciri onto /Volumes/Samsung_T5/NICER-data/

    obsid - Observation ID of the object of interest (10-digit str)
    
To securely copy the files from ciri onto /Volumes/Samsung_T5/NICER-data
obsid - Observation ID of the object of interest (10-digit str)
To securely copy the files from ciri onto / Volumes / Samsung_T5 / NICER - data obsid - Observation ID of the object of interest ( 10 - digit str )
def scp(obsid):
    if type(obsid) != str:
        raise TypeError("ObsID should be a string!")
    obsid_dir = 'masonng@ciri.mit.edu:/nfs/ciri/nicer/decrypted/' + obsid
    nicer_dir = Lv0_dirs.NICER_DATADIR
    if os.path.isdir(nicer_dir+obsid): 
        subprocess.run(['rm','-r',nicer_dir+obsid])
    subprocess.run(['scp','-r',obsid_dir,nicer_dir])
    subprocess.run(['rm','-r',nicer_dir + obsid + '/auxil/ni' + str(obsid) + '.cat'])
    return
def scp ( obsid ) : if type ( obsid ) != str : raise TypeError ( "ObsID should be a string!" ) obsid_dir = 'masonng@ciri.mit.edu:/nfs/ciri/nicer/decrypted/' + obsid nicer_dir = Lv0_dirs . NICER_DATADIR if os . path . isdir ( nicer_dir + obsid ) : subprocess . run ( [ 'rm' , '-r' , nicer_dir + obsid ] ) subprocess . run ( [ 'scp' , '-r' , obsid_dir , nicer_dir ] ) subprocess . run ( [ 'rm' , '-r' , nicer_dir + obsid + '/auxil/ni' + str ( obsid ) + '.cat' ] ) return
To securely copy the files from ciri onto /Volumes/Samsung_T5/NICER-data
obsid - Observation ID of the object of interest (10-digit str)
To securely copy the files from ciri onto / Volumes / Samsung_T5 / NICER - data obsid - Observation ID of the object of interest ( 10 - digit str )
"""
    To securely copy the files from ciri onto /Volumes/Samsung_T5/NICER-data/

    obsid - Observation ID of the object of interest (10-digit str)
    """ #to prevent duplicate files ; not likely to be the case, but just in case...
obsid