mirror of
				https://github.com/fjosw/pyerrors.git
				synced 2025-11-04 01:25:46 +01:00 
			
		
		
		
	Feat/flow (#176)
* fix: String conversion of Obs can now handle a dvalue that is NaN or inf * Feat: Added extraction of w0/a from openQCD files * Removed unnecessary round in w0 routine * Improved error handling in fit_t0 * Allowed to change the reference flow time in t0 and w0 determinations. * Added doc string to fit_t0
This commit is contained in:
		
					parent
					
						
							
								5155effbbf
							
						
					
				
			
			
				commit
				
					
						3198088f9c
					
				
			
		
					 3 changed files with 216 additions and 17 deletions
				
			
		| 
						 | 
				
			
			@ -54,6 +54,7 @@ def test_rwms():
 | 
			
		|||
    files = ['openqcd2r1.ms.dat']
 | 
			
		||||
    names = ['openqcd2|r1']
 | 
			
		||||
    t0 = pe.input.openQCD.extract_t0(path, '', dtr_read=3, xmin=0, spatial_extent=4, files=files, names=names, fit_range=2)
 | 
			
		||||
    assert(np.isclose(t0.value, 0.3816208266076627))
 | 
			
		||||
    t0 = pe.input.openQCD.extract_t0(path, prefix, dtr_read=3, xmin=0, spatial_extent=4, r_start=[1])
 | 
			
		||||
    repname = list(rwfo[0].idl.keys())[0]
 | 
			
		||||
    assert(t0.idl[repname] == range(1, 10))
 | 
			
		||||
| 
						 | 
				
			
			@ -64,6 +65,16 @@ def test_rwms():
 | 
			
		|||
 | 
			
		||||
    pe.input.openQCD.extract_t0(path, '', dtr_read=3, xmin=0, spatial_extent=4, files=files, names=names, fit_range=2, plot_fit=True)
 | 
			
		||||
 | 
			
		||||
    with pytest.raises(Exception):
 | 
			
		||||
        pe.input.openQCD.extract_t0(path, '', dtr_read=3, xmin=0, spatial_extent=4, files=files, names=names, fit_range=2, c=14)
 | 
			
		||||
    # w0
 | 
			
		||||
 | 
			
		||||
    w0 = pe.input.openQCD.extract_w0(path, '', dtr_read=3, xmin=0, spatial_extent=4, files=files, names=names, fit_range=2, plot_fit=True)
 | 
			
		||||
    assert(np.isclose(w0.value, 0.5220124285820434))
 | 
			
		||||
 | 
			
		||||
    with pytest.raises(Exception):
 | 
			
		||||
        pe.input.openQCD.extract_w0(path, '', dtr_read=3, xmin=0, spatial_extent=4, files=files, names=names, fit_range=2, c=14)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def test_Qtop():
 | 
			
		||||
    path = './tests//data/openqcd_test/'
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue