readme.rst

changeset 9
3c12ff23695f
parent 8
7f983daf3383
equal deleted inserted replaced
8:7f983daf3383 9:3c12ff23695f
3 3
4 These classes can be used to handle lidar input data. They are still in a very initial stage. There are many features probably not working, but they work for some specific tasks. They work with Licel input files (and also with the Raymetrics modified format). 4 These classes can be used to handle lidar input data. They are still in a very initial stage. There are many features probably not working, but they work for some specific tasks. They work with Licel input files (and also with the Raymetrics modified format).
5 5
6 6
7 Set up 7 Set up
8 ------------ 8 ------
9 9
10 10
11 Parameter file 11 Parameter file
12 ~~~~~~~~~~ 12 ~~~~~~~~~~~~~~
13
13 Before using the classes you need to setup some channel parameters, that are used when converting the lidar data to Single Calculus Chain format. 14 Before using the classes you need to setup some channel parameters, that are used when converting the lidar data to Single Calculus Chain format.
14 15
15 All the parameters are read from an external file stored in the same folder as the code. You can start by changing the file “cf_netcdf_parameters.py” that describe such parameters for the Clermont Ferrand lidar. 16 All the parameters are read from an external file stored in the same folder as the code. You can start by changing the file “cf_netcdf_parameters.py” that describe such parameters for the Clermont Ferrand lidar.
16 17
17 System class 18 System class
18 ~~~~~~~~~~ 19 ~~~~~~~~~~~~
19 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”:: 20 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”::
20 21
22 :::python
21 from licel import LicelLidarMeasurement 23 from licel import LicelLidarMeasurement
22 import cf_netcdf_parameters 24 import cf_netcdf_parameters
23 25
24 class CfLidarMeasurement(LicelLidarMeasurement): 26 class CfLidarMeasurement(LicelLidarMeasurement):
25 extra_netcdf_parameters = cf_netcdf_parameters 27 extra_netcdf_parameters = cf_netcdf_parameters
26 28
27 29
28 Using the class 30 Using the class
29 ------------------ 31 ---------------
30 32
31 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:: 33 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::
32 34
35 :::python
33 import glob # This is needed to read a list of filenames 36 import glob # This is needed to read a list of filenames
34 from lidar import cf_raymetrics #If you have saved the files in a directrory called “lidar” 37 from lidar import cf_raymetrics #If you have saved the files in a directrory called “lidar”
35 38
36 # Go to the folder where you files are stored 39 # Go to the folder where you files are stored
37 cd /path/to/lidar/files 40 cd /path/to/lidar/files
49 #Quicklooks of all the channels 52 #Quicklooks of all the channels
50 my_measurements.plot() 53 my_measurements.plot()
51 54
52 55
53 Converting to SCC format 56 Converting to SCC format
54 -------------------------------- 57 ------------------------
55 58
56 There are some extra info you need to put in before converting to SCC format, 'Measurement_ID', 'Temperature', 'Pressure':: 59 There are some extra info you need to put in before converting to SCC format, 'Measurement_ID', 'Temperature', 'Pressure'::
57 60
61 :::python
58 my_measurement.info['Measurement_ID'] = “20101229op00” 62 my_measurement.info['Measurement_ID'] = “20101229op00”
59 my_measurement.info['Temperature'] = “14” 63 my_measurement.info['Temperature'] = “14”
60 my_measurement.info['Pressure'] = “1010” 64 my_measurement.info['Pressure'] = “1010”
61 65
62 66
63 You can use standard values of temperature and pressure by just calling:: 67 You can use standard values of temperature and pressure by just calling::
64 68
69 :::python
65 my_measurement.get_PT() 70 my_measurement.get_PT()
66 71
67 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). 72 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).
68 73
69 74
70 After you have used this extra input, you save the file using this command:: 75 After you have used this extra input, you save the file using this command::
71 76
77 :::python
72 my_measurement.save_as_netcdf(“filename”) 78 my_measurement.save_as_netcdf(“filename”)
73 79
74 where you change the filename to the filename you want to use. 80 where you change the filename to the filename you want to use.
75 81

mercurial