reloading CSV automatically in Interpolate1D

35 views
Skip to first unread message

JPHBoeing

unread,
Feb 2, 2012, 4:43:51 PM2/2/12
to IADS
I have a constantly changing CSV based on input data that I want to
read into the Interpolate1D function,

it seems when the Interpolate1D derived parameter loads, it caches the
CSV file with whatever was in it at logon and does not update it when
the CSV file changes... is there anyway to have the interpolate1D
function refresh the CSV file used in the interpolation without having
to manually refresh it by updating the derived equations?

FYI, the filename of the csv does not change just the data columns
inside the csv

James Bretz

unread,
Feb 2, 2012, 4:56:58 PM2/2/12
to IADS
Hi Justin,

Sorry, we don't have a way to tell the Interpolate1D function to reload the
CSV file. As you suspected, it only loads the file on initialization (for
speed consideration). We could add that as a request for a future release
though.

Can you explain the "constantly changing CSV file based on input data"
portion? If we knew the nature of the data, we might be able to think of
some other idea... For instance, if there are "N" distinct CSV file states,
then we can switch between all these states using a "choose" or "switch"
function..... but of course if the table interp data is truly variable, then
we'd have to wait for a future release to add a 'reload table' argument to
the function.

Table issues aside, the fastest way to reset the equation is probably to
drag the parameter out of the display and drop it back into the display
(hold shift key down, click on title of display and 'drag' out of display
(like parameter tool), drag out of display then drop back into display.

Hope this helps,
Jim

> --
> You received this message because you are subscribed to the Google Groups
> "IADS" group.
> To post to this group, send email to ia...@googlegroups.com.
> To unsubscribe from this group, send email to
> iads+uns...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/iads?hl=en.
>

James Bretz

unread,
Feb 2, 2012, 5:13:39 PM2/2/12
to IADS
Justin,

Hold on... Adam just had an idea. It's a bit of a kludge, but it might work.

He's trying it now,
Jim

--------------------------------------------------
From: "James Bretz" <j...@iads-soft.com>
Sent: Thursday, February 02, 2012 1:56 PM
To: "IADS" <ia...@googlegroups.com>
Subject: Re: [IADS] reloading CSV automatically in Interpolate1D

Adam Chant

unread,
Feb 2, 2012, 5:48:24 PM2/2/12
to ia...@googlegroups.com
Justin,
OK, we figured something out. However it is to be noted that we are using
the Reset Peak Values to trigger the change.
If you have any other "Peak"; Min, Max, Avg functions within parameters and
displays of the active analysis window it will function as intended and
reset them as a normal action of IADS.

Modify the derived equation of the 1Dinterp to include a "Peak" condition;

Min(0,0), interpolate1D(Parameter1,"C:\PostFlightData\interp.csv",0)

In this case I used Min(0,0) followed by the intended equation. Basically
IADS ignores the first part of the equation and processes the interpolat1D.
However if you press the "Reset Peak Values" on the toolbar in the active
analysis window it will reset the equation and update your interpolat1D.
This is a bit of a hack and not automatic (you have to "refresh" the
interpolat1D by pressing the Reset Peak Values Icon), but it is one possible
solution.


Adam Chant
Symvionics, Inc.
IADS Application Engineer
(661) 273-7003 x 210

JPHBoeing

unread,
Feb 2, 2012, 5:57:18 PM2/2/12
to IADS
Right now that is better than having to open up the config window and
saving the equations again to get the refresh equations prompt...

could you also do it with a trigger parameter? or does that not
refresh/reset the equation?

if I could trigger it with a parameter or an action that would be
ideal.

Thanks,
Justin

Adam Chant

unread,
Feb 2, 2012, 6:17:29 PM2/2/12
to ia...@googlegroups.com
The only way to get the equation to be reevaluated is with these few
functions, when they are reset.

Another technique would be to write a VBscript that acts like a heartbeat
and re-drops the parameter to the display object every second or some
interval.

John Bretz

unread,
Feb 3, 2012, 4:38:23 PM2/3/12
to IADS
That sounds like an interesting mechanism. Maybe we should devise a 1D
lookup that uses parameter names as the dependent variable? Reloading
the CSV at every compute interval might take the CPU down pretty hard.
It could also be written as a complicated derived parameter and just
skip using 1D Interp altogether.

John

James Bretz

unread,
Feb 3, 2012, 4:48:43 PM2/3/12
to IADS
Good point John,
Jim

--------------------------------------------------
From: "John Bretz" <johnw...@roadrunner.com>
Sent: Friday, February 03, 2012 1:38 PM
To: "IADS" <ia...@googlegroups.com>


Subject: [IADS] Re: reloading CSV automatically in Interpolate1D

> That sounds like an interesting mechanism. Maybe we should devise a 1D

Reply all
Reply to author
Forward
0 new messages