readme.rst edited online with Bitbucket

Sat, 05 Nov 2016 21:03:38 +0000

author
Ioannis Binietoglou <ulalume3@yahoo.com>
date
Sat, 05 Nov 2016 21:03:38 +0000
changeset 45
b52cac9a4732
parent 44
c0da580fdb6e
child 46
d84759347999

readme.rst edited online with Bitbucket

readme.rst file | annotate | diff | comparison | revisions
--- a/readme.rst	Thu Nov 03 12:55:44 2016 +0200
+++ b/readme.rst	Sat Nov 05 21:03:38 2016 +0000
@@ -17,12 +17,13 @@
 ~~~~~~~~~~~~
 The next thing you need to create a class that describes you system. This is very simple if your lidar data are in the Licel format, as you only need to specify the external file with the extra SCC parameters. You can use as an example the file “cf_raymetrics.py”:
    
-    :::python
-    from licel import LicelLidarMeasurement
-    import cf_netcdf_parameters
-
-    class CfLidarMeasurement(LicelLidarMeasurement):
-       extra_netcdf_parameters = cf_netcdf_parameters
+    .. code:: python
+       
+       from licel import LicelLidarMeasurement
+       import cf_netcdf_parameters
+   
+       class CfLidarMeasurement(LicelLidarMeasurement):
+           extra_netcdf_parameters = cf_netcdf_parameters
 
 
 Using the class
@@ -30,25 +31,26 @@
 
 Once you have made the above setup you can start using it. The best way to understand how it works is through an interactive shell (I suggest [ipython](http://ipython.org/)).  In the following example I use the cf_raymetrics setup:
    
-    :::python
-    import glob # This is needed to read a list of filenames
-    from lidar import cf_raymetrics #If you have saved the files in a directrory called “lidar”
+    .. code:: python
+    
+       import glob # This is needed to read a list of filenames
+       from lidar import cf_raymetrics #If you have saved the files in a directrory called “lidar”
 
-    # Go to the folder where you files are stored
-    cd /path/to/lidar/files
-
-    # Read the filenames
-    files  = glob.glob("*") # The * reads all the files in the folder.
+       # Go to the folder where you files are stored
+       cd /path/to/lidar/files
 
-    #Read the files
-    my_measurement = cf_raymetrics.CfLidarMeasurement(files)
+       # Read the filenames
+       files  = glob.glob("*") # The * reads all the files in the folder.
+
+       #Read the files
+       my_measurement = cf_raymetrics.CfLidarMeasurement(files)
 
-    #Now the data have been read, and you have a measurement object to work with:
-    # See what channels are present
-    print my_measurement.channels
+       #Now the data have been read, and you have a measurement object to work with:
+       # See what channels are present
+       print my_measurement.channels
 
-    #Quicklooks of all the channels
-    my_measurements.plot()
+       # Quicklooks of all the channels
+       my_measurements.plot()
 
 
 Converting to SCC format
@@ -56,23 +58,25 @@
 
 There are some extra info you need to put in before converting to SCC format, "Measurement_ID", "Temperature", "Pressure":
    
-    :::python
-    my_measurement.info["Measurement_ID"] = "20101229op00"
-    my_measurement.info["Temperature"] = "14"
-    my_measurement.info["Pressure"] = "1010"
+    .. code:: python
+
+       my_measurement.info["Measurement_ID"] = "20101229op00"
+       my_measurement.info["Temperature"] = "14"
+       my_measurement.info["Pressure"] = "1010"
 
 You can use standard values of temperature and pressure by just calling:
    
-    :::python
-    my_measurement.get_PT() 
+    .. code:: python
+    
+       my_measurement.get_PT() 
 
 The standard values can be changed in generic.py. Search the  get_PT method and change of what is appropriate for your station. If you have an external source of temperature and pressure information (a meteorological station) you can automate this by overriding the get_PT method in your system"s class (in our example in the cf_raymetrics.py file).
 
 
 After you have used this extra input, you save the file using this command:
 
-    :::python
-    my_measurement.save_as_netcdf("filename")
+    .. code:: python
+       
+       my_measurement.save_as_netcdf("filename")
 
-where you change the filename to the filename you want to use.
-
+where you change the filename to the filename you want to use.
\ No newline at end of file

mercurial