impedance.py icon indicating copy to clipboard operation
impedance.py copied to clipboard

Preprocessing for EZStat format

Open xraymancs opened this issue 2 years ago • 6 comments

Would it be possible to add a read routine for the EZStat file format which has frequency, |Z|, phase, Re{Z} and -Im{Z} as its 5 columns with a header line. The specific EZStat code would be as follows:

def readEZStat(filename): """ function for reading EZStat csv files Parameters ---------- filename: string Filename of .csv file to extract impedance data from Returns ------- frequencies : np.ndarray Array of frequencies impedance : np.ndarray of complex numbers Array of complex impedances """ data = np.genfromtxt(filename, delimiter=',')

f = data[1:, 0]
Z = data[1:, 3] - 1j*data[1:, 4]

return f, Z

xraymancs avatar Aug 11 '21 16:08 xraymancs

@xraymancs i think it would help if you could provide a couple sample data files? that way they can add some tests too!

hkennyv avatar Aug 21 '21 05:08 hkennyv

Yep, agree with @hkennyv! An example file (even with fake data) would be really helpful here @xraymancs

mdmurbach avatar Sep 09 '21 01:09 mdmurbach

Sorry about the delay, Here it is. I believe that this is the default but it would be more fault tolerant if the input routine would use the column headings to determine what to read in. I cannot guarantee that the order of the columns is always the same as what I get from my instrument. I do note that the subtraction that I showed in my code snippet is necessary asn the file has already applied a negative to the data.

Carlo

On Wed, Sep 8, 2021 at 8:54 PM Matt Murbach @.***> wrote:

Yep, agree with @hkennyv https://github.com/hkennyv! An example file (even with fake data) would be really helpful here @xraymancs https://github.com/xraymancs

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ECSHackWeek/impedance.py/issues/172#issuecomment-915697040, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP6SNP6EUA3BLCPGPTB3NMTUBAHURANCNFSM5B66FDSA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

-- Carlo U. Segre (he/him) -- Duchossois Leadership Professor of Physics Professor of Materials Science & Engineering Director, Center for Synchrotron Radiation Research and Instrumentation Illinois Institute of Technology Voice: 312.567.3498 Fax: 312.567.3494 @.*** http://phys.iit.edu/~segre @.***

xraymancs avatar Sep 09 '21 02:09 xraymancs

I don't think the attachment worked if there was one? (At least I can't see in on the github website)

mdmurbach avatar Sep 09 '21 03:09 mdmurbach

I attached it to the email. Should I put it directly on github?

Carlo

On Wed, Sep 8, 2021 at 10:24 PM Matt Murbach @.***> wrote:

I don't think the attachment worked if there was one? (At least I can't see in on the github website)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ECSHackWeek/impedance.py/issues/172#issuecomment-915731684, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP6SNPZ6LB4HA6WBDLV4IFTUBASHXANCNFSM5B66FDSA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

-- Carlo U. Segre (he/him) -- Duchossois Leadership Professor of Physics Professor of Materials Science & Engineering Director, Center for Synchrotron Radiation Research and Instrumentation Illinois Institute of Technology Voice: 312.567.3498 Fax: 312.567.3494 @.*** http://phys.iit.edu/~segre @.***

xraymancs avatar Sep 09 '21 05:09 xraymancs

Here is the file I sent previously by email, sorry! cell_1.csv

xraymancs

xraymancs avatar Sep 09 '21 05:09 xraymancs