view scripts/aim-o-matic/aim_o_matic_cronjob.sh @ 593:40934f897a56

Fixed certain minor documentation bugs. Added the CAR::designFilters and CAR::stageG methods. These methods design the CAR.coeff coefficients. They have been compared to be the same as the matlab coefficients. An Ear is now contructed with a specific FS or, it uses the default. Added the PsychoAcoustics class to do ERB and Hz conversions. Added the EarTest.C main which allows the construction of an Ear class for testing.
author flatmax
date Wed, 20 Feb 2013 22:30:19 +0000
parents b106283f812f
children
line wrap: on
line source
#!/bin/bash

export PATH=$PATH:/usr/local/bin/

INPUT_DIR=/home/ubuntu/upload
DONE_DIR=/home/ubuntu/processed
mkdir ${DONE_DIR}
OUTPUT_DIR=/var/www/results
sudo mkdir $OUTPUT_DIR
sudo chmod o+w $OUTPUT_DIR
AIMC_DIR=/home/ubuntu/aimc/build/posix-release/
AIMC=$AIMC_DIR/AIMCopy

mkdir -p /tmp/aimc/

for t in `seq 1 580`; do
for f in `ls $INPUT_DIR/*.config`; do
  b=`basename $f`
  WORKING_ID=${b%.config}
  THIS_OUTPUT_DIR=${OUTPUT_DIR}/${WORKING_ID}
  OUTPUT_BASE=${THIS_OUTPUT_DIR}/${WORKING_ID}
  mkdir ${THIS_OUTPUT_DIR}
  SCRIPT_FILE=${OUTPUT_BASE}.script
  PARAMS_FILE=${OUTPUT_BASE}.complete_params
  GRAPH_FILE=${OUTPUT_BASE}.dot
  GRAPH_IMAGE=${OUTPUT_BASE}.png
  ext="wav"
  echo ${INPUT_DIR}/${WORKING_ID}.${ext}	${THIS_OUTPUT_DIR}/${WORKING_ID} | cat >> ${SCRIPT_FILE}
  rm /tmp/aimc/*
  $AIMC -C ${f} -S ${SCRIPT_FILE} -D ${PARAMS_FILE} -G ${GRAPH_FILE}
  dot -Tpng -o ${GRAPH_IMAGE} ${GRAPH_FILE}
  sudo chown www-data ${THIS_OUTPUT_DIR}
  mv ${INPUT_DIR}/${WORKING_ID}.* ${DONE_DIR}/
done
sleep 1
done