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

Non float32 support not implemented yet #4

Open
ljamesherald opened this issue Nov 27, 2018 · 4 comments
Open

Non float32 support not implemented yet #4

ljamesherald opened this issue Nov 27, 2018 · 4 comments

Comments

@ljamesherald
Copy link

Test .fcs file works fine, but whhen replaced wit my .fcs files,
flowrun = load(raw"C:\Users\ljame\Documents\GitHub\FCS-with-Julia\FCS_data\BD-FACS-Aria-II.fcs")
I get ther error Non float32 support not implemented yet. Please see github issues for this project. Is there a workaround for this issue?

@tlnagy
Copy link
Owner

tlnagy commented Nov 27, 2018

Can you send me a FCS file (either upload to this issue or via email) that causes this error?

(text_mappings["\$DATATYPE"] != "F") && error("Non float32 support not implemented yet. Please see github issues for this project.")

It looks like I only implemented support for reading Float32 values for the $DataType. From the spec it looks like there are 4 options:

This keyword describes the type of data written in the DATA segment of the data set. The four
allowed values are 'I', 'F', 'D', or 'A'. The DATA segment is a continuous bit stream with no
delimiters. 'I' stands for unsigned binary integer, F stands for single precision IEEE floating point,
'D' stands for double precision IEEE floating point, and 'A' stands for ASCII. The additional
keywords $PnB (bits per parameter) and $PnR (range per parameter) are needed to completely
describe an event in the DATA segment.

It doesn't appear to be too difficult to add support for these other datatypes.

@ljamesherald
Copy link
Author

Sure thing, here is a link to the .fcs file. Unfortunately, GitHub doesn't allow for .fcs files to be uploaded directly.
https://drive.google.com/file/d/1AixgKRw6nFqAmjK9um1AR0mrDg83wiOO/view?usp=sharing

@tlnagy
Copy link
Owner

tlnagy commented Nov 28, 2018

It looks like your file stores data as an unsigned binary integer (I) , which is not currently implemented.

I can add this feature, but I would also be happy to review and merge a PR if you want to add support. The relevant function is linked to in my previous comment. It doesn't look too difficult to do, here's the relevant section in the spec:

$DATATYPE/I/ means that the events are written as unsigned binary integers. For each
parameter in an event, both the maximum length in bits allocated for storage of the parameter
and the actual integer range used by the parameter within that allocation are needed. The
number of bits per parameter is specified by $PnB. For example, $P1B/16/ specifies that 16 bits
are allocated for parameter 1. $P1R/1024/ specifies that parameter 1 values range from 0 to
1023. This allows the data word length to be specified, facilitating compatibility between machines
with different data word lengths and enabling bit compression of the data.

@tlnagy tlnagy self-assigned this Nov 28, 2018
@tlnagy
Copy link
Owner

tlnagy commented Nov 28, 2018

Here's a dump of all the parameters from your FCS file:

 "\$P7G" => "1.0000000000"
 "\$BEGINANALYSIS" => "00000000000000"
 "\$BTIM" => "10:21:18"
 "\$P4S" => "488-FSC"
 "\$ENDSTEXT" => "00000000000000"
 "\$P4N" => "FSC1-Area"
 "\$TIMESTEP" => "0.0000000100"
 "\$FIL" => "D:\\Data\\Alberts\\Apr 23 2014\\U DMSO.fcs"
 "\$P7F" => "SSC"
 "\$P2R" => "4294967296"
 "\$P6S" => "488-SSC"
 "\$P8V" => "297.0000000000"
 "\$P1E" => "0.0,0.0"
 "\$P1G" => "1.0000000000"
 "\$P2G" => "1.0000000000"
 "\$PAR" => "10"
 "\$P4R" => "4294967296"
 "\$P4L" => "488.0000000000"
 "\$P10P" => "0"
 "\$P9G" => "1.0000000000"
 "\$P8G" => "1.0000000000"
 "\$P2P" => "0"
 "\$SMNO" => "2"
 "\$P10E" => "0.0,0.0"
 "\$P10B" => "32"
 "\$P9N" => "FL11-Height"
 "\$P6V" => "297.0000000000"
 "\$P3E" => "0.0,0.0"
 "\$P10F" => "576/21"
 "\$P3S" => "488-FSC"
 "\$P2B" => "32"
 "\$P2S" => "Time MSW"
 "\$P5B" => "32"
 "\$P5S" => "488-FSC"
 "\$P7L" => "488.0000000000"
 "\$LOST" => "0"
 "\$P5E" => "0.0,0.0"
 "\$DATE" => "23 Apr 2014"
 "\$P7N" => "SSC1-Area"
 "\$TR" => "SSC1-Height,65535"
 "\$P3L" => "488.0000000000"
 "\$NEXTDATA" => "00000000000000"
 "\$P1P" => "0"
 "\$P3N" => "FSC1-Height"
 "\$P2N" => "TIME2"
 "\$P4F" => "FSC"
 "\$P3B" => "32"
 "\$P10N" => "FL12-Height"
 "\$ETIM" => "10:22:34"
 "\$P5G" => "6.0000000000"
 "\$P9S" => "DiO 488-513/26"
 "\$P1S" => "Time LSW"
 "\$P7V" => "297.0000000000"
 "\$P4G" => "1.0000000000"
 "\$P8N" => "SSC1-Width"
 "\$P6P" => "0"
 "\$P9E" => "0.0,0.0"
 "\$P6L" => "488.0000000000"
 "\$P9V" => "378.0000000000"
 "\$P6B" => "32"
 "\$P9P" => "0"
 "\$P3F" => "FSC"
 "\$P10G" => "1.0000000000"
 "\$SYS" => "Summit V6.2.3.15613 Released Version / Windows NT Version 6.1 / Intel Processor"
 "\$P5F" => "FSC"
 "\$P5N" => "FSC1-Width"
 "\$P6N" => "SSC1-Height"
 "\$P2E" => "0.0,0.0"
 "\$P8E" => "0.0,0.0"
 "\$TOT" => "24599"
 "\$P1B" => "32"
 "\$P8F" => "SSC"
 "\$OP" => "MoFlo Astrios"
 "\$P6F" => "SSC"
 "\$P1N" => "TIME"
 "\$P4B" => "32"
 "\$P7S" => "488-SSC"
 "\$P7R" => "4294967296"
 "\$P7E" => "0.0,0.0"
 "\$P8R" => "4294967296"
 "\$P8P" => "0"
 "\$ENDANALYSIS" => "00000000000000"
 "\$P10L" => "488.0000000000"
 "\$P4P" => "0"
 "\$P4V" => "0.0000000000"
 "\$SRC" => " "
 "\$P8B" => "32"
 "\$CYT" => "MoFlo Astrios"
 "\$SPILLOVER" => "2,9,10,1.000000,0.223429,0.028000,1.000000"
 "\$P3P" => "0"
 "\$P5R" => "4294967296"
 "\$P3G" => "6.0000000000"
 "\$P3V" => "0.0000000000"
 "\$P5L" => "488.0000000000"
 "\$P6E" => "0.0,0.0"
 "\$P7B" => "32"
 "\$INST" => "Institution"
 "\$P10R" => "4294967296"
 "\$P8S" => "488-SSC"
 "\$P9B" => "32"
 "\$P1R" => "4294967296"
 "\$PROJ" => "Project"
 "\$P10S" => "DiI 488-576/21"
 "\$P5V" => "0.0000000000"
 "\$P6R" => "4294967296"
 "\$ENDDATA" => "00000000988055"
 "\$BYTEORD" => "1,2,3,4"
 "\$P10V" => "373.0000000000"
 "\$DATATYPE" => "I"
 "\$P8L" => "488.0000000000"
 "\$BEGINSTEXT" => "00000000000000"
 "\$P4E" => "0.0,0.0"
 "\$P9R" => "4294967296"
 "\$P9F" => "513/26"
 "\$P6G" => "1.0000000000"
 "\$BEGINDATA" => "00000000004096"
 "\$P5P" => "0"
 "\$P7P" => "0"
 "\$P9L" => "488.0000000000"
 "\$P3R" => "4294967296"
 "\$MODE" => "L"

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

No branches or pull requests

2 participants