catholicbad.blogg.se

How to change cdf files to something readable
How to change cdf files to something readable









las_file.Children love bedtime stories, reading stories to them make their bedtime more joyful and fun-filled. We can also see from the data.shape part of the listing we have 4101 values per curve which confirms we have data. When we check the curves function, we can see that we have all of our curves and they all have the appropriate units. for col, unit in zip(lumns, units): if col != 'DEPTH': las_file.add_curve(col, data, unit=unit) There are other ways in which this can be handled, for example by writing the depth and curves to the las file in one go. This is achieved using the Python zip function.Īs we already have depth within our las file, we can skip this column by checking the column name. We can then begin to loop through each of the logging measurements / columns within the dataframe along with the units list. Note that this does include the units for the depth measurement. To make things easier, I have created a list containing the measurement units for each well log curve. las_file.add_curve('DEPT', data, unit='m') Writing the Remaining Curves Note that if adding the main depth data, it does need to go in as DEPT rather than DEPTH.

how to change cdf files to something readable

This example here shows how we can add a single curve to the file called DEPT. To add curves to the file we can use the add_curve function and pass in the data and units. Once we have done this we can call upon our header again and we can now see that the values for the well name, UWI, country and field name have all been updated. las_file.well = lasio.HeaderItem('WELL', value=well_name) las_file.well = lasio.HeaderItem('FLD', value=field_name) las_file.well = lasio.HeaderItem('UWI', value=uwi) las_file.well = lasio.HeaderItem('CTRY', value=country) On the right hand side, we will update the HeaderItem and supply a value to it.

how to change cdf files to something readable

To begin assigning the values to the header, we need to call upon las_file.well and select the header attribute we want to add to. well_name = 'Random Well' field_name = 'Random Field' uwi = '123456789' country = 'Random Country'

how to change cdf files to something readable

Doing it this way, rather than passing them directly into the HeaderItem functions makes it easier to change them in the future and also makes it more readable.įor instance, if we created a function where we wanted to update specific parameters within the header based on different files, we can easily pass these variables into the function and we won’t have to update the code within the function. The first step is to create a number of variables that we want to fill in. Now that we have a blank las object to work with, we now need to add information to our LAS header. We can also confirm that we have no data within the file by calling upon las_file.curves, which will return an empty list.











How to change cdf files to something readable