bug fix for missing runs

This commit is contained in:
Beale John Henry
2023-12-10 15:27:40 +01:00
parent 8fe51dc111
commit a597e41a5c

View File

@@ -90,16 +90,22 @@ def generate_lst_df( run_lst, endstation, label, pgroup ):
# make df of lsts to be concatenated # make df of lsts to be concatenated
lst_df = pd.DataFrame() lst_df = pd.DataFrame()
for index, row in range_df.iterrows(): for index, row in range_df.iterrows():
# get approximate dir pwd # get approximate dir pwd
lst_app_dir = row[ "lst_app_dir" ] lst_app_dir = row[ "lst_app_dir" ]
# find matching file # find matching file
try:
lst_dir = glob.glob( lst_app_dir ) lst_dir = glob.glob( lst_app_dir )
# find lsts in lst directory depending on label # find lsts in lst directory depending on label
lst_dir_df = find_lst( lst_dir[0], label ) lst_dir_df = find_lst( lst_dir[0], label )
except IndexError:
lst_dir_df = pd.DataFrame()
# append lst dir dfs # append lst dir dfs
lst_df = pd.concat( [ lst_df, lst_dir_df ], ignore_index=True ) lst_df = pd.concat( [ lst_df, lst_dir_df ], ignore_index=True )
@@ -144,7 +150,7 @@ if __name__ == "__main__":
parser.add_argument( parser.add_argument(
"-p", "-p",
"--pgroup", "--pgroup",
help="pgroup the data are collected in - in form p#####", help="pgroup the data are collected in",
type=str type=str
) )
parser.add_argument( parser.add_argument(
@@ -157,7 +163,7 @@ if __name__ == "__main__":
parser.add_argument( parser.add_argument(
"-o", "-o",
"--output", "--output",
help="name of output file - script will add .lst", help="name of output file",
type=str, type=str,
) )
args = parser.parse_args() args = parser.parse_args()
@@ -177,3 +183,4 @@ if __name__ == "__main__":
# run main # run main
main( run_lst, args.endstation, args.label, args.pgroup, args.output ) main( run_lst, args.endstation, args.label, args.pgroup, args.output )
print( "done" ) print( "done" )