Example #1
0
def directory():
    # set the experiment date 
    now = datetime.datetime.today()
    #now = datetime.datetime(2014, 10, 18, 10, 10, 30)
    print "Today's date: ", now

    # find the experiment starting date
    exp_start = sch.find_experiment_start(now)
    print "Experiment starting date/time: ", exp_start

    # create a unique experiment ID using GUP and beamtime request (BR) numbers:  g + GUP# + r + BR#
    #exp_id = sch.create_experiment_id(now)
                 
    # create an experiment ID using the PI last name 
    exp_id = sch.find_pi_last_name(now)
    print "Experiment ID: ", exp_id

    # create a local directory to store the raw data as: 
    # \local_folder\YYYY-MM\gGUP#rBR#\  or \local_folder\YYYY-MM\PI_last_name\  
    directory = gb.dm_create_directory(exp_start, exp_id, 'local')
    
    return directory
Example #2
0
exp_start = sch.find_experiment_start(now)
print "Experiment starting date/time: ", exp_start

# create a unique experiment ID using GUP and beamtime request (BR) numbers as: 
# g + GUP# + r + BR#
#exp_id = sch.create_experiment_id(now)
             
# create an experiment ID using the PI last name: 
exp_id = sch.find_pi_last_name(now)

print "Experiment ID: ", exp_id

# create a local directory to store the raw data as: 
# \local_folder\YYYY-MM\gGUP#rBR#\  or
# \local_folder\YYYY-MM\PI_last_name\  
directory = gb.dm_create_directory(exp_start, exp_id, 'local')

# create the same directory on the globus personal endpoint
gb.dm_create_directory(exp_start, exp_id, 'personal')

# find the user running now
users = sch.find_users(now)

# print user information
sch.print_users(users)

# share the personal endpoint directory with the users. 
# users will receive an e-mail with a drop-box style link to access the data
cmd = gb.dm_share(directory, users, 'personal')
for share in cmd: 
    print share
Example #3
0
exp_start = sch.find_experiment_start(now)
print "Experiment starting date/time: ", exp_start

# create a unique experiment ID using GUP and beamtime request (BR) numbers as: 
# g + GUP# + r + BR#
#exp_id = sch.create_experiment_id(now)
             
# create an experiment ID using the PI last name: 
exp_id = sch.find_pi_last_name(now)

print "Experiment ID: ", exp_id

# create a directory to store the raw data as: 
# \local_folder\YYYY-MM\gGUP#rBR#\  or
# \local_folder\YYYY-MM\PI_last_name\  
directory = gb.dm_create_directory(exp_start, exp_id)

# find the user running now
users = sch.find_users(now)

# print user information
sch.print_users(users)

# share the data directory in the personal end point with the users. 
# users will receive an e-mail with a drop-box style link to access the data
cmd = gb.dm_share(directory, users, 'personal')
for share in cmd: 
    print share
    #os.system(share)

# upload the raw data to the remote Globus server set in globus.ini (i.e. petrel)
Example #4
0
exp_start = sch.find_experiment_start(now)
print "Experiment starting date/time: ", exp_start

# create a unique experiment ID using GUP and beamtime request (BR) numbers as:
# g + GUP# + r + BR#
#exp_id = sch.create_experiment_id(now)

# create an experiment ID using the PI last name:
exp_id = sch.find_pi_last_name(now)

print "Experiment ID: ", exp_id

# create a directory to store the raw data as:
# \local_folder\YYYY-MM\gGUP#rBR#\  or
# \local_folder\YYYY-MM\PI_last_name\
directory = gb.dm_create_directory(exp_start, exp_id)

# find the user running now
users = sch.find_users(now)

# print user information
sch.print_users(users)

# share the raw data directory with the users.
# users will receive an e-mail with a drop-box style link to access the data
cmd = gb.dm_share(directory, users, 'local')
for share in cmd:
    print share
    #os.system(share)

# upload the raw data to the remote Globus server set in globus.ini (i.e. petrel)