Beispiel #1
0
    aCadence.error_this = aCadence.error_this[0:trunc]
    survey = repr(trunc)
    points_per_curve = len(aCadence.error_this)
    curve_info = [
        points_per_curve, source_class, 0, 0, 0, 0, None, survey, 0, period
    ]
    for i in range(50):
        tfe = ComputeTfe(aRRLyraeFund, aCadence)
        create_database.enter_record(curve_info, curve_info_names, tfe, cursor)

## extract features
sql_cmd = """SELECT source_id FROM sources"""
cursor.execute(sql_cmd)
db_info = cursor.fetchall()
source_ids = tolist(db_info)
noise_dict = noisification.get_noisification_dict()
derive_features.derive_features_par(source_ids,
                                    noise_dict,
                                    cursor,
                                    connection,
                                    number_processors=2,
                                    delete_existing=True)

# take a look at the features
sql_cmd = """SELECT * FROM features_short"""
cursor.execute(sql_cmd)
db_info = cursor.fetchall()
for i in db_info:
    print i

# output all sources to R file for analysis
Beispiel #2
0
sql_cmd = """UPDATE features SET n_points=(SELECT number_points FROM sources WHERE features.source_id = sources.source_id)"""
cursor.execute(sql_cmd)
connection.commit()




##########
########## DERIVE FEATURES FOR THE DATA
##########
sql_cmd = """SELECT source_id FROM sources"""        
cursor.execute(sql_cmd)
connection.commit()
db_info = cursor.fetchall()
source_ids = tolist(db_info)
noise_dict = noisification.get_noisification_dict()
derive_features.derive_features_par(source_ids,noise_dict,cursor,connection,number_processors=2,delete_existing=True)
connection.commit()


##########
########## OUTPUT RESULTS
##########
## output all sources to R file for analysis
sql_cmd = """SELECT source_id FROM sources"""
cursor.execute(sql_cmd)
db_info = cursor.fetchall()
source_ids = tolist(db_info)
db_output.outputRfile(source_ids,cursor,'../data_processed/job_talk.dat')

## output tfes