Ask Your Question
0

how to convert .out files to .txt files

asked 2021-05-22 01:56:09 -0500

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!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2021-05-22 02:25:30 -0500

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.

edit flag offensive delete link more

Comments

OK! Thank you!

breeze2021 gravatar imagebreeze2021 ( 2021-05-22 20:27:21 -0500 )edit

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 ( 2021-05-23 19:13:17 -0500 )edit

does help(dyntools) work for you?

perolofl gravatar imageperolofl ( 2021-05-24 04:45:29 -0500 )edit

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 ( 2021-05-24 06:27:51 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

1 follower

Stats

Asked: 2021-05-22 01:56:09 -0500

Seen: 87 times

Last updated: May 22