Example #1
0
def get_reference_dict(calibration_file_path=False):

    if not calibration_file_path:
        app = QApplication(sys.argv)
        file_dialog = QFileDialog()
        file_dialog.setWindowFlags(Qt.WindowStaysOnTopHint)
        file_path = file_dialog.getOpenFileName(None,
                                                "FAMES REF FILE",
                                                filter="*.cdf")[0]
        file_dialog.close()
        app.exit()
    else:
        file_path = calibration_file_path

    if not file_path: return None

    else:

        gcms_ref_obj = get_gcms(file_path)
        sql_obj = start_sql_from_file()
        rt_ri_pairs = get_rt_ri_pairs(gcms_ref_obj, sql_obj=sql_obj)
        # !!!!!! READ !!!!! use the previous two lines if db/pnnl_lowres_gcms_compounds.sqlite does not exist
        # and comment the next line
        #rt_ri_pairs = get_rt_ri_pairs(gcms_ref_obj)

        return rt_ri_pairs, file_path
Example #2
0
def get_calibration_rtri_pairs(ref_file_path, corems_paramaters_json_file):

    gcms_ref_obj = get_gcms(ref_file_path, corems_paramaters_json_file)
    #sql_obj = start_sql_from_file()
    #rt_ri_pairs = get_rt_ri_pairs(gcms_ref_obj,sql_obj=sql_obj)
    # !!!!!! READ !!!!! use the previous two lines if db/pnnl_lowres_gcms_compounds.sqlite does not exist
    # and comment the next line
    rt_ri_pairs = get_rt_ri_pairs(gcms_ref_obj)
    return rt_ri_pairs
Example #3
0
def get_reference_dict():

    file_path = Path.cwd() / "tests/tests_data/gcms/" / "GCMS_FAMES_01_GCMS-01_20191023.cdf"
    
    gcms = get_gcms(file_path)

    sql_obj = start_sql_from_file()

    if not file_path: return  None
    
    else:
        
        gcms_ref_obj = get_gcms(file_path)

        rt_ri_pairs = get_rt_ri_pairs(gcms_ref_obj, sql_obj)

        return rt_ri_pairs, file_path