#!/bin/sh

# 
# FB-LRTA: Fixed-Basis Low-Rank Tensor Approximation
# Copyright (C) 2023-2025  James E. Fowler
# 
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
# 
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Library General Public License for more details.
# 
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
# MA 02139, USA.
# 


# ROSIS datasets
filename=pavia
sensor=rosis

# Data parameters
spatial_ratio=8

datadir="Data"
resultsdir="Results/$filename/$filename"_lrta
mkdir -p $resultsdir

resultsfile=$resultsdir/$filename.reconstructed.mat
outimage=$resultsdir/$filename.reconstructed.png
errplot=$resultsdir/$filename.error.png

testingdir=$datadir
testingfile=$testingdir/$filename.mat

fblrta_reconstruct.py \
    -s $sensor \
    -sr $spatial_ratio \
    -e $errplot \
    --crop 256 \
    $testingfile $resultsfile $outimage
