mirror of
				https://github.com/fjosw/pyerrors.git
				synced 2025-11-04 01:25:46 +01:00 
			
		
		
		
	docs: latex in docstring of covariance fixed
This commit is contained in:
		
					parent
					
						
							
								c54ea54069
							
						
					
				
			
			
				commit
				
					
						7f5989dfb9
					
				
			
		
					 3 changed files with 5 additions and 7 deletions
				
			
		
							
								
								
									
										2
									
								
								.github/workflows/flake8.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/flake8.yml
									
										
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -21,6 +21,6 @@ jobs:
 | 
			
		|||
      - name: flake8 Lint
 | 
			
		||||
        uses: py-actions/flake8@v1
 | 
			
		||||
        with:
 | 
			
		||||
          ignore: "E501,W605"
 | 
			
		||||
          ignore: "E501"
 | 
			
		||||
          exclude: "__init__.py, input/__init__.py"
 | 
			
		||||
          path: "pyerrors"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -30,6 +30,6 @@ pytest --cov=pyerrors --cov-report html
 | 
			
		|||
```
 | 
			
		||||
The linter `flake8` is executed with the command
 | 
			
		||||
```
 | 
			
		||||
flake8 --ignore=E501,W605 --exclude=__init__.py pyerrors
 | 
			
		||||
flake8 --ignore=E501 --exclude=__init__.py pyerrors
 | 
			
		||||
```
 | 
			
		||||
Please make sure that all tests are passed for a new pull requests.
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1333,7 +1333,7 @@ def correlate(obs_a, obs_b):
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
def covariance(obs, visualize=False, correlation=False, **kwargs):
 | 
			
		||||
    """Calculates the covariance matrix of a set of observables.
 | 
			
		||||
    r'''Calculates the covariance matrix of a set of observables.
 | 
			
		||||
 | 
			
		||||
    The gamma method has to be applied first to all observables.
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1349,11 +1349,9 @@ def covariance(obs, visualize=False, correlation=False, **kwargs):
 | 
			
		|||
    Notes
 | 
			
		||||
    -----
 | 
			
		||||
    The covariance is estimated by calculating the correlation matrix assuming no autocorrelation and then rescaling the correlation matrix by the full errors including the previous gamma method estimate for the autocorrelation of the observables. For observables defined on a single ensemble this is equivalent to assuming that the integrated autocorrelation time of an off-diagonal element is equal to the geometric mean of the integrated autocorrelation times of the corresponding diagonal elements.
 | 
			
		||||
    $$
 | 
			
		||||
    \tau_{\mathrm{int}, ij}=\sqrt{\tau_{\mathrm{int}, i}\times \tau_{\mathrm{int}, j}}
 | 
			
		||||
    $$
 | 
			
		||||
    $$\tau_{\mathrm{int}, ij}=\sqrt{\tau_{\mathrm{int}, i}\times \tau_{\mathrm{int}, j}}$$
 | 
			
		||||
    This construction ensures that the estimated covariance matrix is positive semi-definite (up to numerical rounding errors).
 | 
			
		||||
    """
 | 
			
		||||
    '''
 | 
			
		||||
 | 
			
		||||
    length = len(obs)
 | 
			
		||||
    cov = np.zeros((length, length))
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue