Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

readgssi not reading binary csv radargram file #48

Open
KBslu opened this issue Jan 17, 2024 · 4 comments
Open

readgssi not reading binary csv radargram file #48

KBslu opened this issue Jan 17, 2024 · 4 comments

Comments

@KBslu
Copy link

KBslu commented Jan 17, 2024

I converted a dzt file into a csv and ran a PCA on the file, but I wasn't able to reread the edited csv into readgssi.

2024-01-16 23:38:04 - reading...
2024-01-16 23:38:04 - input file:         /content/drive/MyDrive/Link portal/rgssi/09_13_2023_perroot/1600MHz/Processed_Outputs/dzt2csv/5cm_spacing/001.csv
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-5-3dd721c2cf13> in <cell line: 1>()
----> 1 readgssi.readgssi(infile=r'/content/drive/MyDrive/Link portal/rgssi/09_13_2023_perroot/1600MHz/Processed_Outputs/dzt2csv/5cm_spacing/001.csv', frmt=None, verbose=True, histogram=False,)

1 frames
/usr/local/lib/python3.10/dist-packages/readgssi/dzt.py in readdzt(infile, gps, spm, start_scan, num_scans, epsr, antfreq, verbose, zero)
    204         else:
    205             infile.seek(98 + (MINHEADSIZE*(chan))) # start of antenna bytes for channel n
--> 206         header['dzt_ant'][chan] = infile.read(14)
    207         header['rh_ant'][chan] = header['dzt_ant'][chan].decode('utf-8').split('\x00')[0]
    208         header['rh_antname'][chan] = header['rh_ant'][chan].rsplit('x')[0]

IndexError: list assignment index out of range
@iannesbitt
Copy link
Owner

Hi @KBslu, readgssi doesn't have great CSV support at the moment. What's the command you used to get this output?

@KBslu
Copy link
Author

KBslu commented Jan 17, 2024

Here is the command:

readgssi.readgssi(infile=r'/content/drive/MyDrive/Link portal/rgssi/09_13_2023_perroot/1600MHz/5cm_spacing/xaxis_ydirection/5CM_1600MHZ_TRUNCATED_001.DZT', outfile=r'/content/drive/MyDrive/Link portal/rgssi/09_13_2023_perroot/1600MHz/Processed_Outputs/dzt2csv/5cm_spacing/001', frmt='csv')

@iannesbitt
Copy link
Owner

Sorry for the confusion—I meant what's the command you use to try to read the CSV back into readgssi?

@KBslu
Copy link
Author

KBslu commented Jan 17, 2024

readgssi.readgssi(infile=r'/content/drive/MyDrive/Link portal/rgssi/09_13_2023_perroot/1600MHz/Processed_Outputs/dzt2csv/5cm_spacing/001.csv', frmt=None, verbose=True, histogram=False,)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants