#!/usr/bin/perl


open(DIR,"ls GAS.*.cube.fits.gz |");
while($file=<DIR>) {
    chop($file);
    $name=$file;
    $cut="GAS.";
    $name =~ s/$cut//;
    $cut=".cube.fits.gz";
    $name =~ s/$cut//;
    $call="surface_mayavi_NAME_off.py ".$name." 1";
    system($call);
#
    $call="mv maya* CM_3D/";
    system($call);
    print "$call\n";
}
close(DIR);
