Sponsored Content
Top Forums Programming Find gaps in time data and replace missing time value and column 2 value by interpolation in awk Post 302931906 by malandisa on Friday 16th of January 2015 10:11:21 AM
Old 01-16-2015
Dear RudiC and everyone,

Thank you. this solution works and does exactly what I really needed. The interpolation is just alright. As you can see this is time series data for some quantity that depends on the sun, which exhibits higher values during the day that at night. this is morning and the variation of the quantity more complex due to too many factors. So this interpolation does just fine. I have just increased the precision of the D0/D1 to include more significant figures and that solves the problem you indicated with the
Code:
D1 > D0

.

Again may I say thank you and am sure this will help others as well.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

calculate the average of time series data using AWK

Hi, I have two time series data (below) merged into a file. t1 and t2 are in unit of second I want to calculate the average of V1 every second and count how many times "1" in V2 is occur within a second Input File: t1 V1 t2 V2 10.000000... (5 Replies)
Discussion started by: nica
5 Replies

2. Shell Programming and Scripting

How to get data between the start time and end time?

Hi, Can anyone help me how can I get the line that between the start time and end time. file1.txt 15/03/2009 20:45:03 Request: - Data of this line 15/03/2009 20:45:12 Response: - Data of this line 15/03/2009 22:10:40 Request: - Data of this line 15/03/2009 22:10:42 Response: - Data of... (1 Reply)
Discussion started by: tanit
1 Replies

3. Shell Programming and Scripting

Searching for Gaps in Time

I am very new to shell scripting. We use C-Shell here and I know the issues that surround it. I hope a solution can be created using awk, sed, etc... instead of having to write a program. I have an input file that is sorted by date and time in ascending order ... (2 Replies)
Discussion started by: jclanc8
2 Replies

4. Shell Programming and Scripting

Find and Convert UTC Time to PST Time

Hello All - I have a script that grabs data from the net and outputs the following data 46029 46.144 -124.510 2010 07 26 22 50 320 4.0 6.0 2.2 9 6.8 311 1012.1 -0.9 13.3 13.5 13.3 - - 46041 47.353 -124.731 2010 07 26 22 50 250 2.0 3.0 1.6 8 6.4 - 1011.6 - ... (0 Replies)
Discussion started by: drexnefex
0 Replies

5. Shell Programming and Scripting

awk/sed to search & replace data in first column

Hi All, I need help in manipulating the data in first column in a file. The sample data looks like below, Mon Jul 18 00:32:52 EDT 2011,NULL,UAT Jul 19 2011,NULL,UAT 1] All field in the file are separated by "," 2] File is having weekly data extracted from database 3] For eg.... (8 Replies)
Discussion started by: gr8_usk
8 Replies

6. UNIX for Dummies Questions & Answers

Converting string date time to unix time in AWK

I'd like to convert a date string in the form of sun aug 19 09:03:10 EDT 2012, to unixtime timestamp using awk. I tried This is how each line of the file looks like, different date and time in this format Sun Aug 19 08:33:45 EDT 2012, user1(108.6.217.236) all: test on the 17th ... (2 Replies)
Discussion started by: bkkid
2 Replies

7. Shell Programming and Scripting

awk : collecting all data between two time frame

Hi Experts , I need your help to collect the complete data between two time frame from the log files, when I try awk it's collecting the data only which is printed with time stamp for example, awk works well from "16:00 to 17:30" but its not collecting <line*> "from 17:30 to 18:00" ... (8 Replies)
Discussion started by: zenkarthi
8 Replies

8. Programming

Resample time series data with replacement any way to do this in awk or just bash script

I have some time series data that I need to resample or downsample at some specific time intervals. The firs column is time in decimal hours. I am tryiong to resample this data every 3 minutse. So I need a data value ever 0.05. Here is the example data and as you can see, there time slot for 0.1500... (3 Replies)
Discussion started by: malandisa
3 Replies

9. Shell Programming and Scripting

XY interpolation by time in awk

Hi I am a newbie in awk scripting. I'm working with a file with xy coordinates that were acquired with a time stamp. All the time stamps were recorded but not the XY coordinates. Let see an example: FFID X Y UNIX TIME TIMEGAP... (8 Replies)
Discussion started by: Joćo Noiva
8 Replies

10. Shell Programming and Scripting

Awk: time intervals based on epoch time

I have a list of epoch times delimited by "-" as follows: 1335078000 - 1335176700 1335340800 - 1335527400 1335771300 - 1335945600 1336201200 - 1336218000 The corresponding dates are: 20120422 1000 - 20120423 1325 20120425 1100 - 20120427 1450 20120430 1035 - 20120502 1100 ... (3 Replies)
Discussion started by: alex2005
3 Replies
mlib_ImageInterpTableCreate(3MLIB)			    mediaLib Library Functions				mlib_ImageInterpTableCreate(3MLIB)

NAME
mlib_ImageInterpTableCreate - creates an interpolation table SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ] #include <mlib.h> void *mlib_ImageInterpTableCreate(mlib_type type, mlib_s32 width, mlib_s32 height, mlib_s32 leftPadding, mlib_s32 topPadding, mlib_s32 sub- sampleBitsH, mlib_s32 subsampleBitsV, mlib_s32 precisionBits, const void *dataH, const void *dataV); DESCRIPTION
The mlib_ImageInterpTableCreate() function creates an interpolation table based on prameters spedified. This function creates an internal data structure, an interpolation table, which can be used by some image geometric functions for imple- menting a table-driven interpolation algorithm. The parameter type defines the type of dataH/dataV input arrays and can be MLIB_BYTE, MLIB_SHORT, MLIB_USHORT, MLIB_INT, MLIB_FLOAT, or MLIB_DOUBLE. The dataH array should have at least width*2**subsampleBitsH entries. dataH[i*2**subsampleBitsH] holds the coefficient for the leftmost neighboring pixel, dataH[i*2**subsampleBitsH + 1] holds the coefficient for the second neighboring pixel from left, ..., and dataH[i*2**subsampleBitsH + width - 1] holds the coefficient for the rightmost neighboring pixel, where i = 0, 1, 2, ..., 2**subsampleBitsH - 1. The dataV array should have at least height*2**subsampleBitsV entries or should be NULL. If dataV is NULL, then dataH is used in its place, and in this case the parameters topPadding, height, and subsampleBitsV are ignored. PARAMETERS
The function takes the following arguments: type Data type of the coefficients. width Width of the interpolation kernel in pixels. height Height of the interpolation kernel in pixels. leftPadding Number of pixels lying to the left of the interpolation kernel key position. topPadding Number of pixels lying above the interpolation kernel key position. subsampleBitsH Numbers of bits used for the horizontal subsample position. subsampleBitsV Numbers of bits used for the vertical subsample position. precisionBits Number of fractional bits used to describe the coefficients. dataH Pointer to horizontal coefficient data. dataV Pointer to vertical coefficient data. RETURN VALUES
The function returns a pointer to an interpolation table. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
mlib_ImageInterpTableDelete(3MLIB), mlib_ImageAffineTable(3MLIB), mlib_ImageZoomTranslateTable(3MLIB), mlib_ImageGridWarpTable(3MLIB), mlib_ImagePolynomialWarpTable(3MLIB), attributes(5) SunOS 5.10 9 Nov 2004 mlib_ImageInterpTableCreate(3MLIB)
All times are GMT -4. The time now is 04:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy