First time here? We are a friendly community of Power Systems Engineers. Check out the FAQ!

Ask Your Question
0

how to convert .out files to .txt files

asked May 22 '1

breeze2021 gravatar image

Hello, everyone!

Recently I used Python to do some dynamics simulations. But I can only get the channel outputs through .out files. I don't know how to convert the .out files to .txt files. I want to use these output data to do some analysis.

I would appreciate your help.

Thanks a lot!

1 answer

Sort by » oldest newest most voted
0

answered May 22 '1

perolofl gravatar image

Use module dyntools to convert the file to CSV-format.

import dyntools
output_obj = dyntools.CHNF('outfile.out')
output_obj.csvout(channels=[])

This will export all channels to CSV-file. Select specific channels with argument channels. e.g. channel 4, 5 and 6 with channels = [4,5,6]. See also help documentation for dyntools.

link

Comments

OK! Thank you!

breeze2021 gravatar imagebreeze2021 (May 23 '1)

I have used the following code to import dyntools, however I have got the following Attribute error:CHNF instance has no attribute 'csvout'. Could you tell me the reason? Thanks again!

breeze2021 gravatar imagebreeze2021 (May 24 '1)

does help(dyntools) work for you?

perolofl gravatar imageperolofl (May 24 '1)

yes, dyntools work. I tried txtout instead of csvout and it works. But I don't know why can't csvout work.

breeze2021 gravatar imagebreeze2021 (May 24 '1)

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.
Want to format code in your answer? Here is a one minute demo on Youtube

Add Answer

[hide preview]

Question Tools

1 follower

Stats

Asked: May 22 '1

Seen: 1,238 times

Last updated: May 22 '21