creepmeters class

class csi.creepmeters(name, utmzone=None, ellps='WGS84', lon0=None, lat0=None, verbose=True)

A class that handles creepmeter data

Args:
  • name : Name of the dataset.

Kwargs:
  • utmzone : UTM zone (optional, default=None)

  • lon0 : Longitude of the center of the UTM zone

  • lat0 : Latitude of the center of the UTM zone

  • ellps : ellipsoid (optional, default=’WGS84’)

  • verbose : Speak to me (default=True)

date2real(date)

Pass from a datetime to a real number. Weird method… Who implemented that?

Args:
  • date : datetime instance

Returns:
  • float

deleteStation(station)

Removes a station.

Args:
  • station : Name of the station to remove

Returns:
  • None

distance(station, point, direction)

Computes the distance between a station and a point.

Args:
  • station : Name of a station.

  • point : [Lon, Lat].

  • direction : Direction of the positive sign.

Returns:
  • None. Distance is stored in the {data} attribute under the station name.

fitLinear(station, period=None, directory='.')

Fits a linear trend onto the offsets for the station ‘station’.

Args:
  • station : station name

Kwargs:
  • period : list of 2 tuples (yyyy, mm, dd)

  • directory : If station files have not been read before, this is the directory where to find the station files

Returns:
  • None

fitLinearAllStations(period=None, directory='.')

Fits a linear trend to all the available stations. Can specify a period=[startdate, enddate]

Args:
  • period : list of 2 tuples (yyyy, mm, dd)

Kwargs:
  • directory : If station files have not been read before, this is the directory where to find the station files

Returns:
  • None

lonlat2xy()

Converts the lat lon positions into utm coordinates.

Returns:
  • None

plotStation(station, figure=100, save=None)

Plots one station evolution through time.

Args:
  • station : name of the station

Kwargs:
  • figure : figure numner

  • save : name of the file if you want to save

Returns:
  • None

position(station)

Returns lon,lat of a station.

Args:
  • station : Name of a station.

Returns:
  • lon, lat

readAllStations(directory='.')

Reads all the station files.

Kwargs:
  • directory : directory where to find the station files

Returns:
  • None

readStationData(station, directory='.')

From the name of a station, reads what is in station.day.

Args:
  • station : name of the station

Kwargs:
  • directory : directory where to find the station.day file.

Returns:
  • None

readStationList(filename)

Reads the list of Stations. Input file format is

Station Name

Lon

Lat

Args:
  • filename : Input file.

Returns:
  • None

selectbox(minlon, maxlon, minlat, maxlat)

Select the earthquakes in a box defined by min and max, lat and lon.

Args:
  • minlon : Minimum longitude.

  • maxlon : Maximum longitude.

  • minlat : Minimum latitude.

  • maxlat : Maximum latitude.

Returns:
  • None