[Kst] [EXTERNAL] Problem using KST from Command Line

Roger Wehage raw915 at gmail.com
Wed Apr 22 19:23:30 UTC 2015


Hi David,

On the contrary, this discussion has been quite beneficial. I’ve been aware of kst less than two weeks and am facing a learning curve. My goal is to find out if kst can do what I need, and so far it appears to be the best option I’ve found. The main difficulty is that the kst2 GUI and its conventions are considerably different than the kst1 GUI and its conventions, which are described in the kst1 Handbook. So there is some extrapolation and faith involved in bridging the gap between the kst1 Handbook and the kst2 application.

I understand from 3.4 Datasources in the Kst1 Handbook that there are a number of default datasources, including an ASCII datasource. But I can find no information related to datasources for kst2. The manual says to enter kinfocenter at the command line, but that option is not on my computer. It is apparently part of KDE, which I've been unable to install and likely shouldn’t need to install. I assume that the xml files set up in kst GUI sessions contain the ASCII datasource information, but I don’t see any way to use this information other than to reference the appropriate .kst file from the command line. The part I haven’t figured out is how to merge command-line options with those that are set in the .kst file. If I’ve set up a .kst file to plot channels from a data file and try to issue commands overriding the plot commands in the .kst file, I get the original plots from the .kst file plus additional frames sans plots, which is clearly not what I want.

> That hack seems to be the quickest way to do it but it is less than ideal. Another option would be for your application to generate a tailored .kst file for the user's selections and load that from the command line but that seems like a lot of work.


That was my first thought, but the .kst file is sacred and must not be touched. So I figured, “If the hill will not come to Mahomet, Mahomet will go to the hill.” http://www.literaturepage.com/read/francis-bacon-essays-24.html <http://www.literaturepage.com/read/francis-bacon-essays-24.html> Thus on to Plan B where I was thinking of permuting header information so as to fool the rigid .kst file into picking the set of channels that the user wants. But before attempting that I must study this https://mail.kde.org/pipermail/kst/2011-March/019494.html <https://mail.kde.org/pipermail/kst/2011-March/019494.html> to insure that I’m not “Reinventing the square wheel.” http://en.wikipedia.org/wiki/Reinventing_the_wheel#Related_phrases <http://en.wikipedia.org/wiki/Reinventing_the_wheel#Related_phrases> It would be ideal to have kst2 read auxiliary channel selection information from a separate file or pipe and not modify the original data file at all. Thus users may choose to use the kst2 GUI as usual to directly access channels as they see fit, or they may use my GUI to direct kst2 to access channels without the need to learn kst2.

Once I understand the problem and potential solution(s) sufficiently, I will attempt to submit a feature request.

Best regards,

Roger


> On Apr 22, 2015, at 9:40 AM, David McMinn <David.McMinn at halliburton.com> wrote:
> 
> Hi Roger,
> 
> I'm not sure I can explain it any more but I'll try - it sounds like your usage is more advanced than mine. I was pointing out that if you modify the default settings for the ASCII datasource (that is what loads an ASCII file, it is separate from the Data Wizard) that it can prevent the data being loaded from the command line (which I got caught out with). It sounds like you've already experimented with that a lot, more than me.
> 
> I use KST in two different scenarios. One mainly from the GUI and one from the command line (I'm using Windows BTW, but KST should behave the same). When working from the GUI I tend to work with files which have a header and the column titles start in line 11 and the data in row 12. One time I decided to save myself some time and when I created the vector from my data file I set it up for names on line 11 and data on line 12 and ticked the "Apply these settings as default" option.
> 
> When using from the command line I have an application that generates data to a file which has the column header in line 1 and data starts on line 2. When I started using this application after changing the defaults in the ASCII datasource as above the plots were created but remained empty and no data was loaded from the file - this sounded like your original description of the problem so I thought I'd point out another avenue that Barth did not mention.
> 
> As you have already discovered the command line is much more rudimentary and only seems to allow specifying some values such as filename, number of points and X/Y column, labels.
> 
> That hack seems to be the quickest way to do it but it is less than ideal. Another option would be for your application to generate a tailored .kst file for the user's selections and load that from the command line but that seems like a lot of work.
> 
> You might be able to achieve more with the Python interface but it's not something I know anything about although I've seen it mentioned on the list.
> 
> Sorry I couldn't be more help.
> Best regards,
> David.
> 
> -----Original Message-----
> From: Kst [mailto:kst-bounces at kde.org] On Behalf Of Roger Wehage
> Sent: 22 April 2015 14:17
> To: kst at kde.org
> Subject: Re: [Kst] [EXTERNAL] Problem using KST from Command Line
> 
> Hi David,
> 
> Can you explain this a bit more? I’m trying to generate plots from the command line without using a .kst file. Since I’m using the precompiled kst binary inside the kst2.app installed from the downloaded kst2.dmg, I assume that the binary was compiled with predefined default settings for Data Manager and Data Wizard. What I know is that the settings in Data Wizard when I launch kst though the kst2.app are:
> 
> Apply these settings as default is not checked Data starts at line: 2 Read field names from line: 1 is checked Read units from line: 1 is not checked Decimal Separator: is set to Dot Space/tab delimited is selected Interpret empty value as: Zero is selected
> 
> Other settings, some of which I had set in previous sessions, are
> 
> Curve Placement: 1 new plot per curve
> Plot Layout: Custom grid Columns: 3
> Plot Placement (Tabs): All in current tab is selected
> Labels: Rescale all labels on tab is checked
> Legends: Auto is selected
> Curve Style: Lines only
> 
> I don’t know if some or all of these settings become the default for command-line execution or if they revert back to defaults set when the kst binary was created. I’m guessing that any of my changes from factory defaults do not apply for command-line execution. From the KST Command Line Usage most of these settings cannot be changed through options. And I know that at least one of the above settings do not apply when I invoke kst from the command line. For example, I have set Plot Layout: Custom grid Columns: 3 but I get only one column for any number of plots from the command line.
> 
> Also I have found that at least one Kst Settings in Preferences… does not work as I would expect. Preferences should be remembered. I haven’t explored all of them, but under Scaling the default Reference view size: the default is A4. When I set it to Letter I would expect my preference to be Letter the next time I launch kst. But when I relaunch kst it has been set back to A4, which means that my preference was not remembered.
> 
> So I’m not sure what most kst settings are when called from the command line or how to change them if I wanted to. It would be nice to set up and save a kst configuration file from within the kst GUI using Data Manager and Data Wizard and then append this configuration file to the command line. I know that a .kst file already does something along these lines, but it is too rigid. Having to set up a different .kst file in the GUI for potentially thousands of variations that I envision defeats the purpose of the command-line feature.
> 
> Let’s take this simple example. I have a file containing 100 channels. The user wants to plot 15 of those channels in three columns. Which 15 channels does she want and in what order? Take your pick. She wants to plot any 15 of those channels in any order. How many combinations is that? So how would I implement this from the command line? Right now I know of only one way, and it’s a hack. In the GUI I set up a .kst file to generate 15 plots in three columns for the first fifteen channels, say c01 through c15, exactly as I want her to see them. When she runs this .kst file from the command line she will see plots of the first fifteen channels by rows in the 5 by 3 grid, which is likely not what she wants.
> 
> So what is the hack? Through my GUI she will select any 15 channels from my channels list in any order. Then my program will temporarily permute channel headings in the data file so that c01 through c15 appear above the 15 channels in the order she selected them. Since I had set up the .kst file to look for channels c01 through c15 in that order, it will find and plot her 15 channels in the order she selected.
> 
> Best regards,
> 
> Roger
> 
>> On Apr 22, 2015, at 2:03 AM, David McMinn <David.McMinn at halliburton.com> wrote:
>> 
>> Hi Roger,
>> 
>> Another thing to check would be whether you have change the default ASCII loader settings. I had the same issue and it was because I had defaulted my ASCII loader to expect a different column separator and line number to read column names from.
>> 
>> David.
>> 
>> 
>> ----------------------------------------------------------------------
>> This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient.  Any review, use, distribution, or disclosure by others is strictly prohibited.  If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message.
>> _______________________________________________
>> Kst mailing list
>> Kst at kde.org
>> https://mail.kde.org/mailman/listinfo/kst
> 
> Roger Wehage
> raw915 at gmail.com
> I prefer to use encrypted email.
> My public key fingerprint is 2FC0 7616 DDB6 6B42 FF9C 775A FAEF DF7B 266E DB80.
> Learn how to encrypt your email with the Email Self Defense guide (https://emailselfdefense.fsf.org/).
> 
> 
> 
> _______________________________________________
> Kst mailing list
> Kst at kde.org
> https://mail.kde.org/mailman/listinfo/kst
> _______________________________________________
> Kst mailing list
> Kst at kde.org
> https://mail.kde.org/mailman/listinfo/kst

Roger Wehage
raw915 at gmail.com
I prefer to use encrypted email.
My public key fingerprint is 2FC0 7616 DDB6 6B42 FF9C 775A FAEF DF7B 266E DB80.
Learn how to encrypt your email with the Email Self Defense guide (https://emailselfdefense.fsf.org/).



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kst/attachments/20150422/f93230e6/attachment-0001.html>


More information about the Kst mailing list