I find the log very useful to understand what happens during a session. But there's so much stuff in it it's hard to get the goodies that are important to an imager, rather than to someone troubleshooting the code or what not. So I wrote a little Python program that extracts the goodies from the log. You can get a copy for free here: http://www.ganssle.com/jack/astro.html - look for the title on that page "SharpCap Log Processor". Enjoy!
Here's an example of the output:
Here's a utility to analyze SharpCap's Log
Re: Here's a utility to analyze SharpCap's Log
This indeed looks very useful.
But could you describe how to use? I have just a very little bit of Python knowledge. I tried to use it but get errors that are gibberish for me
I presume this can be used for the normal log files as well?
Menno
But could you describe how to use? I have just a very little bit of Python knowledge. I tried to use it but get errors that are gibberish for me
I presume this can be used for the normal log files as well?
Menno
Meade LX200 8" f/10 ACF OTA / Ioptron CEM25EC / Zwo ASI071MC Pro / Zwo ASI482MC
Re: Here's a utility to analyze SharpCap's Log
You have to install Python on your computer and be sure you can access it from whatever directory you're using this utility in. (That depends on your OS).
Then enter this command:
parse_sharpcap_log.py log_file
So, for instance, Sharpcap's log files have long names. I'll rename the one I want to use something like "log1.log". Then I enter:
parse_sharpcap_log.py log1.log
This will generate a file named log1.log_parsed.txt, which you can examine with any text editor, like notepad.
Jack
Then enter this command:
parse_sharpcap_log.py log_file
So, for instance, Sharpcap's log files have long names. I'll rename the one I want to use something like "log1.log". Then I enter:
parse_sharpcap_log.py log1.log
This will generate a file named log1.log_parsed.txt, which you can examine with any text editor, like notepad.
Jack
Re: Here's a utility to analyze SharpCap's Log
Okay, I was on the right path then.
I have Python 3.11.3 installed on my system (Windows 11). I open Windows Powershell in the log directory where your script also is in.
In Powershell I enter Python and Python is running. I tested it with print("Hello, world!") and that does work with no errors.
But when I use parse_sharpcap_log.py log1.log (I renamed a log to that), I get this error:
Menno
I have Python 3.11.3 installed on my system (Windows 11). I open Windows Powershell in the log directory where your script also is in.
In Powershell I enter Python and Python is running. I tested it with print("Hello, world!") and that does work with no errors.
But when I use parse_sharpcap_log.py log1.log (I renamed a log to that), I get this error:
Code: Select all
>>> parse_sharpcap_log.py log1.log
File "<stdin>", line 1
parse_sharpcap_log.py log1.log
^^^^
SyntaxError: invalid syntax
>>>Meade LX200 8" f/10 ACF OTA / Ioptron CEM25EC / Zwo ASI071MC Pro / Zwo ASI482MC
Re: Here's a utility to analyze SharpCap's Log
You are running the Python interpreter, and then invoking the program. I have never run the interpreter like that so don't know much about it.
I run the program from the DOS command prompt. So I tell Windows to run "cmd", which opens a DOS window, then change directories to where my program (parse_sharpcap_log.py) and log file are. Then, from the DOS command prompt ('>'), run it. This is a screen shot: What is happening is that the CMD window sees a file with the extension ".py" and it runs the program under Python.
Jack
I run the program from the DOS command prompt. So I tell Windows to run "cmd", which opens a DOS window, then change directories to where my program (parse_sharpcap_log.py) and log file are. Then, from the DOS command prompt ('>'), run it. This is a screen shot: What is happening is that the CMD window sees a file with the extension ".py" and it runs the program under Python.
Jack
Re: Here's a utility to analyze SharpCap's Log
Thanks for the info Jack. Thought I had to run in in that Python interpreter.
Did run it in Powershell with .\parse_sharpcap_log.py log2.log and now it works (with Powershell you have to add .\ at the start of the line).
But your script really is for sequencer logs I see now. Which is logical I realize now since the normal logs for instance have no line numbers or timed events.
But cool nevertheless and I got an extra basic training with Python
Menno
Did run it in Powershell with .\parse_sharpcap_log.py log2.log and now it works (with Powershell you have to add .\ at the start of the line).
But your script really is for sequencer logs I see now. Which is logical I realize now since the normal logs for instance have no line numbers or timed events.
But cool nevertheless and I got an extra basic training with Python
Menno
Meade LX200 8" f/10 ACF OTA / Ioptron CEM25EC / Zwo ASI071MC Pro / Zwo ASI482MC
- admin
- Site Admin
- Posts: 17574
- Joined: Sat Feb 11, 2017 3:52 pm
- Location: Vale of the White Horse, UK
- Contact:
Re: Here's a utility to analyze SharpCap's Log
Hi,
that looks very cool - thanks for sharing.
I also find the log can be difficult to find specific things in at times, but almost all of the info comes in handy from time to time when tracking down bugs or whatever. I use a freeware program called 'Tailviewer' which is quite good for finding particular things in the log (like finding all the lines that mention guiding or whatever). I have a plugin for it that helps it interpret the log correctly - I am away at the moment, but will try to dig out and share the plug in when I get back.
cheers,
Robin
that looks very cool - thanks for sharing.
I also find the log can be difficult to find specific things in at times, but almost all of the info comes in handy from time to time when tracking down bugs or whatever. I use a freeware program called 'Tailviewer' which is quite good for finding particular things in the log (like finding all the lines that mention guiding or whatever). I have a plugin for it that helps it interpret the log correctly - I am away at the moment, but will try to dig out and share the plug in when I get back.
cheers,
Robin
-
kaymann
- Posts: 297
- Joined: Thu Jun 16, 2022 2:59 pm
- Location: https://azkayfes.blogspot.com/
Re: Here's a utility to analyze SharpCap's Log
Visual Studio Code (free) is also a great notepad replacement and does all the above. I use VSC as a complete replacement for notepad and default it for *.log, *.ini, *txt, *CSV, *.PDF, etc. You can definitely use it with custom filters to include/exclude segments of your log files.
Having said that I love to create and or borrow python and other C code to enhance my computing life. Jack this is awesome work!
Randall
Having said that I love to create and or borrow python and other C code to enhance my computing life. Jack this is awesome work!
Randall
Re: Here's a utility to analyze SharpCap's Log
Hi Jack.
Where can I found "SharpCap Log Processor" ? I can't find it following the link you provide.
Best regards
Eric H.
Where can I found "SharpCap Log Processor" ? I can't find it following the link you provide.
Best regards
Eric H.