mirror of
				https://asciireactor.com/otho/cloudy-agn.git
				synced 2025-11-04 08:08:06 +00:00 
			
		
		
		
	added bulk interpolation fix script
This commit is contained in:
		
							parent
							
								
									83dcad1348
								
							
						
					
					
						commit
						84c621f35e
					
				
							
								
								
									
										25
									
								
								scripts/meta/bulk_interpolation_fix.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										25
									
								
								scripts/meta/bulk_interpolation_fix.sh
									
									
									
									
									
										Executable file
									
								
							@ -0,0 +1,25 @@
 | 
				
			|||||||
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					script_dir=$( cd $(dirname $0) ; pwd -P |sed 's@^\(.*\)/scripts.*@\1/scripts@')
 | 
				
			||||||
 | 
					basedir=`pwd`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [[ -x $script_dir/../bin/interpolate_fix]];
 | 
				
			||||||
 | 
					then
 | 
				
			||||||
 | 
					    echo "Binary available. Proceeding."
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
 | 
					    echo "Binary unavailable. Exiting."
 | 
				
			||||||
 | 
					    exit 9
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#for fortfile in $(echo fort.*);
 | 
				
			||||||
 | 
					for fortfile in $@
 | 
				
			||||||
 | 
					do
 | 
				
			||||||
 | 
					    if [[ -e $(basename $fortfile) ]]
 | 
				
			||||||
 | 
					    then
 | 
				
			||||||
 | 
					        mkdir -p uninterpolated
 | 
				
			||||||
 | 
					        mv $fortfile uninterpolated
 | 
				
			||||||
 | 
					        echo $script_dir/../bin/interpolate_fix uninterpolated/$(basename $fortfile) $fortfile
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					        echo $script_dir/../bin/interpolate_fix $fortfile $(basename $fortfile)
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					exit 0
 | 
				
			||||||
@ -43,7 +43,7 @@ int main(int argc, char const *argv[]) {
 | 
				
			|||||||
            outlier_it++;
 | 
					            outlier_it++;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    std::ofstream smoothed_table_file;
 | 
					    std::ofstream smoothed_table_file;
 | 
				
			||||||
    smoothed_table_file.open("smoothed_eqwidth_table");
 | 
					    smoothed_table_file.open(argv[2]);
 | 
				
			||||||
    smoothed_table_file << agn::format_eqwidth_table(smooth_table);
 | 
					    smoothed_table_file << agn::format_eqwidth_table(smooth_table);
 | 
				
			||||||
    smoothed_table_file.close();
 | 
					    smoothed_table_file.close();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user