Changeset 27


Ignore:
Timestamp:
09/05/08 11:43:58 (16 years ago)
Author:
meynadie
Message:

passage en timing_cycle

Location:
mire
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • mire/mire.sh

    r18 r27  
    2020 
    2121CATALOG=$(basename $1 .fits).cat 
     22OUTPUT_FITS=$(basename $1 .fits)_sf.fits 
     23 
    2224if test $skip_sextractor == false 
    2325then 
     
    3133echo "Mesures géométriques..." 
    3234OUTPUT_FILENAME=$(basename $1 .fits).mes 
    33 python $PATH_TO_MIRE/process.py -c $CATALOG -r $2 -o test.fits -m $OUTPUT_FILENAME -t $3 
     35python $PATH_TO_MIRE/process.py -c $CATALOG -r $2 -o $OUTPUT_FITS -m $OUTPUT_FILENAME -t $3 
    3436 
    3537 
  • mire/mire_all.sh

    r18 r27  
    1414 
    1515rm -f collect 
    16 for file in *.fits; do 
     16for file in *_0.fits; do 
    1717    if test $skip_sextractor == true 
    1818    then 
    19         mire -s $file reperes.txt timing; 
     19        mire -s $file reperes.txt timing_cycle; 
    2020    else 
    21         mire $file reperes.txt timing; 
     21        mire $file reperes.txt timing_cycle; 
    2222    fi 
    2323    tail -n1 $(basename $file .fits).mes >> collect; 
  • mire/process.py

    r18 r27  
    3434# ls -l $1| awk '{print$8 "\t" $7 "\t" $6}' | sort -k2 | sed -e 's/*//' 
    3535# où $1 est le répertoire contenant les .dat non modifiés.) 
    36  
    37 is_ref=1 
    38 refdt=datetime(1970,1,1,0,0) 
    39 dt = refdt 
    40 delta_t = dt - refdt 
     36# format attendu : nom_fichier phase_cycle date_isoformat 
     37 
    4138for line in file(options.timing): 
    4239    line_s = string.split(line) 
    4340    if (len(line_s) > 2): 
    4441        nom = line_s[0] [:-4] 
    45         if (is_ref==1): 
    46             [heure,minute] = string.split(line_s[1],":") 
    47             [annee,mois,jour] = string.split(line_s[2],"-") 
    48             refdt =  datetime(int(annee), 
    49                               int(mois), 
    50                               int(jour), 
    51                               int(heure), 
    52                               int(minute)) 
    53             is_ref=0 
    5442        if (nom == options.catalogfile[:-6]): 
    55             [heure,minute] = string.split(line_s[1],":") 
    56             [annee,mois,jour] = string.split(line_s[2],"-")             
    57             dt = datetime(int(annee), 
    58                           int(mois), 
    59                           int(jour), 
    60                           int(heure), 
    61                           int(minute)) 
    62             delta_dt = dt-refdt 
     43            dt = datetime.strptime(line_s[2], 
     44                                   "%Y-%m-%dT%H:%M:%S") 
     45            phase = float(line_s[1]) 
    6346 
    6447# Donner les coordonnées approximatives des 4 repÚres 
     
    9174        for i in range(len(fields)): 
    9275            tmp[fields[i]] = float(spl[i]) 
     76        tmp['MEAN_DIST_TO_NGBRS']=0 
    9377        catalog.append(tmp) 
    9478 
     
    287271                                         modulus(vec_i), 
    288272                                         modulus(vec_j), 
    289                                          delta_dt.seconds/60., 
     273                                         phase, 
    290274                                         dt.isoformat()) 
    291275meas.write(outs) 
Note: See TracChangeset for help on using the changeset viewer.