-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jozef Tran
committed
May 31, 2023
1 parent
7061bd9
commit 3005523
Showing
12 changed files
with
156 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,18 @@ | ||
# jws2txt | ||
JASCO file to text file converter | ||
|
||
jws2txt converts JASCO spectrophotometer *.jws files to *.txt files. | ||
A program to convert binary JASCO SpectraManager (JWS and JWB) files to text files. | ||
|
||
|
||
Introduction | ||
## Introduction | ||
------------ | ||
jws2txt is a simple command line tool allowing conversion | ||
JWS and JWB files from Jasco SpectraManager software. jws2txt converts JWS and JWB files to | ||
text files that can be used in any data analysis workflows and software. | ||
jws2txt is a simple command line tool that allows for the conversion of JWS and JWB files from JASCO SpectraManager software to text files. These text files can be used in any data analysis workflows and software. | ||
|
||
Contrary to Jasco SpectraManager software jws2txt allows for batch conversion | ||
of JWS/JWB files. | ||
Unlike JASCO SpectraManager software, jws2txt enables batch conversion of JWS/JWB files. | ||
|
||
Data unpack is based on Víctor M. Hernández-Rocamora's jwsProcessor | ||
(https://github.com/vhernandez/jwsProcessor). | ||
Data unpacking is based on Víctor M. Hernández-Rocamora's jwsProcessor (https://github.com/vhernandez/jwsProcessor). | ||
|
||
Installation and usage | ||
## Installation and Usage | ||
------------ | ||
1. Download python, preferentially in Anaconda distribution. | ||
2. Download this repository, unzip it. | ||
3. Run the 'pip install -r requirements.txt' command in the command line. | ||
4. To convert the files run the 'python jws2txt.py path_to_folder' command, where path_to_folder | ||
is a folder containing JWS or JWB files. | ||
5. Input the number of channels the files have. | ||
6. Converted files will be in the folder containing source JWS or JWB files | ||
1. Download Python. | ||
2. Run the 'pip install jws2txt' command in the command line. | ||
3. To convert the files, run the 'jws2txt --in-path path_to_folder --out-dir output_folder_path' command, where path_to_folder is the folder containing the JWS or JWB files. | ||
4. The converted files will be located in the folder containing the source JWS or JWB files. |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import unittest | ||
from jws2txt.jws2txt import str2bool | ||
from argparse import ArgumentTypeError | ||
|
||
|
||
class TestStr2Bool(unittest.TestCase): | ||
|
||
def test_str2bool(self): | ||
self.assertTrue(str2bool('y')) | ||
self.assertTrue(str2bool('true')) | ||
self.assertFalse(str2bool('n')) | ||
self.assertFalse(str2bool('f')) | ||
with self.assertRaises(ArgumentTypeError): | ||
str2bool('blurb') | ||
|
||
|
||
|
||
if __name__=='__main__': | ||
unittest.main() |