prep txmode waterfalls into respective subdirs
parent
5c921438b8
commit
0bf1519409
|
@ -25,27 +25,31 @@
|
||||||
#
|
#
|
||||||
# Possible vetted_status: bad, failed, good, null, unknown.
|
# Possible vetted_status: bad, failed, good, null, unknown.
|
||||||
|
|
||||||
cd /srv/satnogs
|
|
||||||
|
|
||||||
OBSENC="$1"
|
OBSENC="$1"
|
||||||
OBSIDMIN="$2"
|
OBSIDMIN="$2"
|
||||||
OBSIDMAX="$3"
|
OBSIDMAX="$3"
|
||||||
OBSID=$OBSIDMIN
|
OBSID=$OBSIDMIN
|
||||||
|
DATADIR="/srv/satnogs/data/txmodes/$OBSENC"
|
||||||
|
DOWNDIR="/srv/satnogs/download"
|
||||||
|
|
||||||
|
mkdir -p $DATADIR
|
||||||
|
cd $DATADIR || exit
|
||||||
|
|
||||||
# Enable the following if you want to download waterfalls in this range:
|
# Enable the following if you want to download waterfalls in this range:
|
||||||
#echo "Downloading Waterfalls"
|
#echo "Downloading Waterfalls"
|
||||||
#./wut-water-range $OBSIDMIN $OBSIDMAX
|
#./wut-water-range $OBSIDMIN $OBSIDMAX
|
||||||
|
|
||||||
# XXX remove data/train and data/val directories XXX
|
# XXX remove data/train and data/val directories XXX
|
||||||
echo "Removing data/ subdirectories"
|
echo "Removing subdirectories"
|
||||||
rm -rf data/train data/val
|
rm -rf train/ val/
|
||||||
# Create new empty dirs
|
# Create new empty dirs
|
||||||
mkdir -p data/train/good data/train/bad data/train/failed
|
mkdir -p train/good/ train/bad/ train/failed/
|
||||||
mkdir -p data/val/good data/val/bad data/val/failed
|
mkdir -p val/good/ val/bad/ val/failed/
|
||||||
|
|
||||||
# Then parse each file and link appropriately
|
# Then parse each file and link appropriately
|
||||||
echo "Parsing download/ directory for observation IDs $OBSIDMIN to $OBSIDMAX"
|
echo "Parsing download/ directory for observation IDs $OBSIDMIN to $OBSIDMAX"
|
||||||
cd download/ || exit
|
cd $DOWNDIR || exit
|
||||||
|
|
||||||
while [ $OBSID -lt $OBSIDMAX ]
|
while [ $OBSID -lt $OBSIDMAX ]
|
||||||
do cd $OBSID
|
do cd $OBSID
|
||||||
|
@ -59,11 +63,11 @@ while [ $OBSID -lt $OBSIDMAX ]
|
||||||
CLASS_DIR="val"
|
CLASS_DIR="val"
|
||||||
fi
|
fi
|
||||||
case "$VET" in
|
case "$VET" in
|
||||||
bad) ln waterfall_$OBSID_*.png ../../data/$CLASS_DIR/$VET/
|
bad) ln waterfall_$OBSID_*.png $DATADIR/$CLASS_DIR/$VET/
|
||||||
;;
|
;;
|
||||||
good) ln waterfall_$OBSID_*.png ../../data/$CLASS_DIR/$VET/
|
good) ln waterfall_$OBSID_*.png $DATADIR/$CLASS_DIR/$VET/
|
||||||
;;
|
;;
|
||||||
failed) ln waterfall_$OBSID_*.png ../../data/$CLASS_DIR/$VET/
|
failed) ln waterfall_$OBSID_*.png $DATADIR/$CLASS_DIR/$VET/
|
||||||
;;
|
;;
|
||||||
null) echo "null, not copying"
|
null) echo "null, not copying"
|
||||||
;;
|
;;
|
||||||
|
@ -74,3 +78,4 @@ while [ $OBSID -lt $OBSIDMAX ]
|
||||||
let OBSID=$OBSID+1
|
let OBSID=$OBSID+1
|
||||||
cd ..
|
cd ..
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue