T O P I C R E V I E W |
beaglexpeak |
Posted - 01/25/2011 : 3:14:46 PM Origin Ver. 8.5 SR1 Operating System: Windows XP
Hi I'd appreciate some help in writing a script.
I have importing Data with 3 columns: time, temperature, heatflow. (The Data are from DSC-measurements, may anybody knows.) The heating program from the measurement had three segments: first heating, cooling, second heating. Between this segments are normaly a short isothermic phase. The columns are sorted at col(1) "time".
So what I want, copy or extract this segments (without the short isothermic phases) in a separately worksheet in the same book and named "first heating", "cooling" and "second heating". It would be fine, when the skript can find this three phases automatly, because the measurements are quite different.
I hope, anybody can anderstand my problem and may can help me. Thanks so lot, Ciao beaglexpeak |
7 L A T E S T R E P L I E S (Newest First) |
Sam Fang |
Posted - 02/10/2011 : 03:03:49 AM Do you mean you also want to extract heatflow data? If so, you can copy them by the beginning and ending index which can be found in the string sa.GetAt(ii)$, such as [Graph1]1!Plot(1)[10:21]. Extra script can be as follows, suppose heatflow data are in Book1.
-------------------------------------
string str1=sa.GetAt(1)$;
%A=str1.GetToken(3,'[')$;
%B="[";
//Get the beginning and ending index for markers
%A=%B%A;
//Range for heatflow data
range zz=[Book1]1!col(3)%A;
col(3)=zz; -------------------------------------
Sam OriginLab Technical Services |
beaglexpeak |
Posted - 02/01/2011 : 4:01:19 PM Hello Sam, thanks for helping. Your skript example is useful and works very well. I'm sorry to say, I have still a problem. The Regional Data Selector are selecting the data in graph. For selection I have to plot my data with time as X-axis. I need the time-signal only for selction. After there I need the temperature at the selected time-window. I cant use the temperature as a X-axis from beginning, because I have at one temperaturepoint three heatflow-points. The temperature is increas at first then colling and at end the temperature is increas. May be my english is not good enough for writing down my intention, sorry . I think, I can use the tool "Extract Worksheet Data" but I dont know, how can I select the increase and decrease temperature-data. Thanks beaglexpeak
|
Sam Fang |
Posted - 01/31/2011 : 01:25:50 AM Rise Time tool is included in OriginPro8.5, not Origin8.5. But even using the Rise Time tool you can only find a process of heating or cooling once. You have to move the rectangle region repeatedly.
You can also use Regional Data Selector tool in Tools toolbar to add data markers for the process of heating or cooling. Then use X-Function get_plot_sel to access the selected data and copy it to a new worksheet. A script example is shown as follows, and suppose data markers have been added. --------------------------------------
string strRange;
get_plot_sel str:=strRange;
StringArray sa;
sa.Append(strRange$,"|"); // Tokenize it
int nNumRanges = sa.GetSize();
for(int ii = 1; ii <= nNumRanges; ii++)
{
range -wx xx = sa.GetAt(ii)$;
range -w yy = sa.GetAt(ii)$;
string strWks$ = "Temp$(ii)";
create %(strWks$) -wn 10 A B;
col(A)=xx;
col(B)=yy;
} -------------------------------------- Note that the above example can find all data ranges added by Regional Data Selector in the loop.
Sam OriginLab Technical Services |
beaglexpeak |
Posted - 01/30/2011 : 4:02:46 PM Hello Sam, I don't have such menu "Gadgets: Rise Time" when the graph window is active. (In german version it would names: minitools: Flankenanalyse).I can only see five other points by gadgets. Can I download this tool anywhere?
I'm not shure, if I can use the command "extract.." ot "copy" in my skript because I don't know how can I select the curve sections.
Ciao beaglexpeak |
Sam Fang |
Posted - 01/30/2011 : 01:21:02 AM Gadgets Tool is only available when a graph window is active. From Origin's menu, select Gadgets: Rise Time.
Sam OriginLab Technical Services |
beaglexpeak |
Posted - 01/29/2011 : 4:15:52 PM My Origin version is: Origin 8.5 OG SR1.
I can't find the Gadget Tool: "rise time". Maybe I can download this tool on the university??.. i will ask my administrators.
Anyway, it would be nice, to have a skript to automation the import from Data's with three columns (this part i have). Afterward the skript should make the separation (1st heating, cooling, 2nd heating). I dont know, how can I do this .
Thanks for all  |
Sam Fang |
Posted - 01/26/2011 : 9:59:52 PM I am not sure whether Origin8.5's Gadgets Tool : Rise Time can do it. You can try it.
Thanks.
Sam OriginLab Technical Services |
|
|