resistics.project.data module¶
-
class
resistics.project.data.
ProjectData
(projectFile: str, refTime: datetime.datetime, calPath: str, timePath: str, specPath: str, statPath: str, maskPath: str, transFuncPath: str, imagePath: str, config=None)[source]¶ Bases:
resistics.common.base.ResisticsBase
Project class for storing project attributes
- Attributes
- projectFilestr
Path to project file
- timePathstr
Path to time series data
- specPathstr
Path to spectra data
- statPathstr
Path to statistics
- transPathstr
Path to transfer function data
- calPathstr
Path to calibration data
- imagePathstr
Path to project images
- refTimedatetime.datetime
The project reference time
- projStartdatetime.datetime
The first time sample in the data
- projEnddatetime.datetime
The last time sample in the data
- sitesList[str]
List of sites in the project
- siteDataDict[str, SiteData]
Site data for each site
- calFilesList
A list of calibration files
- configConfigData
Configuration data
Methods
__init__()
Initialise project with default values
refresh()
Refresh the project
checkDirectories()
Check the project directories to make sure they exist
getCalInfo()
Get calibration file information
getSiteInfo()
Get information about all the sites and store site data information
getSites(fs=None)
Get a list of all sites, or those with data at a sampling frequency of fs Hz
getNumSites()
Get the total number of sites
getSampleFreqs()
Get a list of all the unique sample frequencies in the project
getSiteConcurrent(site)
Get a list of sites that were recording concurrently to site
getSiteData(site)
Get site data for a single site
checkSite(site)
Check a site exists
view()
View the project timeline
printList()
Class status returned as list of strings
-
checkDirectories
(self) → None[source]¶ Check to see if project directories exist and if not, make them
-
checkSite
(self, site: str) → bool[source]¶ Check if site is part of the project
- Parameters
- sitestr
Name of the site
-
createSite
(self, site: str) → bool[source]¶ Creates a site folder in the time data path
- Parameters
- sitestr
Name of the site
-
getSampleFreqs
(self) → List[float][source]¶ List of all the sampling frequencies found in the project
- Returns
- List[float]
List of sampling frequencies in Hz
-
getSiteConcurrent
(self, site: str) → List[str][source]¶ Find sites which were occupied at the same time as a chosen site
This lists all sites that were occupied at the same time as the user supplied site. It can be useful in cases where multi-site processing will be performed
- Parameters
- sitestr
The name of the site
- Returns
- List[str]
List of sites which were recording concurrently
-
getSiteData
(self, site) → Union[resistics.site.data.SiteData, bool][source]¶ Get site data for site
- Parameters
- sitestr
Site name
- Returns
- SiteData
Site data for site or False if the site is not found
-
getSites
(self, sampleFreq: Union[NoneType, float, int] = None)[source]¶ Get list of sites
Optionally filtered to those with measurements recorded at fs Hz
- Parameters
- sampleFreqfloat, int, optional
Sampling frequency Hz
- Returns
- List[str]
List of site names
-
printList
(self) → List[str][source]¶ Class information as a list of strings
- Returns
- outList[str]
List of strings with information