mirror of
https://gitea.psi.ch/APOG/acsmnode.git
synced 2025-06-26 11:34:20 +02:00
Update with template for compute_cpc_flags(). This still needs to be completed.
This commit is contained in:
@ -15,15 +15,25 @@ import argparse
|
|||||||
|
|
||||||
import yaml, json
|
import yaml, json
|
||||||
|
|
||||||
dimaPath = os.path.normpath(os.path.join(thisFilePath, "..", "..",'..')) # Move up to project root
|
projectPath = os.path.normpath(os.path.join(thisFilePath, "..", "..",'..')) # Move up to project root
|
||||||
projectPath = os.path.normpath(os.path.join(dimaPath,'..'))
|
#print('Project path:', projectPath)
|
||||||
print(dimaPath)
|
dimaPath = os.path.normpath('/'.join([projectPath,'dima']))
|
||||||
sys.path.append(dimaPath)
|
#print('DIMA path:', dimaPath)
|
||||||
|
|
||||||
|
|
||||||
|
# Set up project root directory
|
||||||
|
sys.path.insert(0,projectPath)
|
||||||
|
sys.path.insert(0,dimaPath)
|
||||||
import dima.src.hdf5_ops as dataOps
|
import dima.src.hdf5_ops as dataOps
|
||||||
import pipelines.steps.utils as stepUtils
|
import pipelines.steps.utils as stepUtils
|
||||||
import dima.utils.g5505_utils as utils
|
import dima.utils.g5505_utils as utils
|
||||||
import json
|
import json
|
||||||
|
|
||||||
|
def compute_cpc_flags():
|
||||||
|
# TODO: ask rob where to find this information.
|
||||||
|
|
||||||
|
return 0
|
||||||
|
|
||||||
def compute_diagnostic_variable_flags(data_table, validity_thresholds_dict):
|
def compute_diagnostic_variable_flags(data_table, validity_thresholds_dict):
|
||||||
"""
|
"""
|
||||||
Create indicator variables that check whether a particular diagnostic variable is within
|
Create indicator variables that check whether a particular diagnostic variable is within
|
||||||
@ -47,6 +57,8 @@ def compute_diagnostic_variable_flags(data_table, validity_thresholds_dict):
|
|||||||
# Initialize a dictionary to store indicator variables
|
# Initialize a dictionary to store indicator variables
|
||||||
indicator_variables = {}
|
indicator_variables = {}
|
||||||
|
|
||||||
|
indicator_variables['t_base'] = data_table['t_base']
|
||||||
|
|
||||||
# Loop through the column names in the data table
|
# Loop through the column names in the data table
|
||||||
for diagnostic_variable in data_table.columns:
|
for diagnostic_variable in data_table.columns:
|
||||||
print(diagnostic_variable)
|
print(diagnostic_variable)
|
||||||
|
Reference in New Issue
Block a user