Skip to content

Instantly share code, notes, and snippets.

@oeway
Last active October 2, 2016 22:30
Show Gist options
  • Save oeway/b28e298081ad8ef9dd7139200cbb654f to your computer and use it in GitHub Desktop.
Save oeway/b28e298081ad8ef9dd7139200cbb654f to your computer and use it in GitHub Desktop.
Convert Tagged Spot File (.tsf from MicroManager) to Comma Separated Values file(.csv for thunderSTORM)
# modified from https://github.com/ZhuangLab/storm-analysis/blob/master/storm_analysis/sa_utilities/read_tagged_spot_file.py
import sys
import struct
import google.protobuf.internal.decoder as decoder
import TSFProto_pb2
if (len(sys.argv)<2):
print("usage: <tsf file>")
exit()
tsf_file_path = sys.argv[1]
if len(sys.argv)>2:
export_file_path = sys.argv[2]
else:
export_file_path = tsf_file_path + '.csv'
def _getV(fp, format, size):
return struct.unpack(format, fp.read(size))[0]
tsf_file = open(tsf_file_path, "rb")
# Read magic number and offset
mnumber = _getV(tsf_file, "I", 4)
offset = _getV(tsf_file, ">Q", 8)
print("mnumber:", mnumber)
print("offset:", offset)
# Read SpotList message
tsf_file.seek(offset+12)
buffer = tsf_file.read()
(spot_list_size, position) = decoder._DecodeVarint(buffer, 0)
spot_list = TSFProto_pb2.SpotList()
spot_list.ParseFromString(buffer[position:position+spot_list_size])
print("Spot List:", spot_list_size)
print(spot_list)
print("")
ps = spot_list.pixel_size
header = 'frame,x [nm],y [nm],z [nm],intensity [photon]\n'
f = open(export_file_path, 'w')
f.write(header)
# Export to csv file(for thunderSTORM)
cur_pos = 12
print('exporting...')
for i in range(spot_list_size):
tsf_file.seek(cur_pos)
buffer = tsf_file.read(200)
(spot_size, position) = decoder._DecodeVarint(buffer, 0)
spot = TSFProto_pb2.Spot()
spot.ParseFromString(buffer[position:position+spot_size])
cur_pos += position + spot_size
line = "{frame:d},{x:.2f},{y:.2f},{z:.2f},{intensity:.2f}\n"
f.write(line.format(frame=spot.frame,x=spot.x,y=spot.y,z=spot.z,intensity=spot.intensity))
print(i)
print('done')
tsf_file.close()
#
# The MIT License
#
# Copyright (c) 2013 Zhuang Lab, Harvard University
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
// This is a copy originally from: https://valelab.ucsf.edu/svn/valelabtools/TSFProto
package TSF;
option java_package = "edu.ucsf.tsf";
option java_outer_classname = "TaggedSpotsProtos";
enum FitMode {
ONEAXIS = 0;
TWOAXIS = 1;
TWOAXISANDTHETA = 2;
}
enum IntensityUnits {
COUNTS = 0;
PHOTONS = 1;
}
enum LocationUnits {
NM = 0;
UM = 1;
PIXELS = 2;
}
// If units will always be the same for all spots, then use these units tags,
message SpotList {
// UID for the application that generated these data
// Request a UID from nico at cmp.ucsf.edu or use 1
required int32 application_id = 1 [default = 1];
optional string name = 2; // name identifying the original dataset
optional string filepath = 3; // path to the image data used to generate these spot data
optional int64 uid = 4; // Unique ID, can be used by application to link to original data
optional int32 nr_pixels_x = 5; // nr pixels in x of original data
optional int32 nr_pixels_y = 6; // nr pixels in y of original data
optional float pixel_size = 7; // pixel size in nanometer
optional int64 nr_spots = 8; // number of spots in this data set
optional int32 box_size = 17; // size (in pixels) of rectangular box used in Gaussian fitting
optional int32 nr_channels = 18; // Nr of channels in the original data set
optional int32 nr_frames = 19; // Nr of frames in the original data set
optional int32 nr_slices = 20; // Nr of slices in the original data set
optional int32 nr_pos = 21; // Nr of positions in the original data set
// otherwise use the unit tags with each spot
optional LocationUnits location_units = 22;
optional IntensityUnits intensity_units = 23; // use only if different from SpotList
// If fitmode will always be the same for all spots, then use this fitmode
// otherwise use the fitmode with each spot
optional FitMode fit_mode = 24;
optional bool is_track = 25 [default = false]; // flag indicating whether this is a sequence of spot data in consecutive time frames thought to originate from the same entity
//repeated Spot spot = 8;
}
message Spot {
required int32 molecule = 1; // ID for this spot
required int32 channel = 2; // channels are 1-based
required int32 frame = 3; // frames are 1-based
optional int32 slice = 4; // slices are 1-based
optional int32 pos = 5; // positions are 1-based
// xyz coordinates of the spot in location_units after fitting and optional correction
optional LocationUnits location_units = 17;
required float x = 7;
required float y = 8;
optional float z = 9;
// Intensity values
optional IntensityUnits intensity_units = 18; // use only if different from SpotList
required float intensity = 10; // integrated spot density
optional float background = 11; // background determined in fit
optional float width = 12; // peak width at half height in location units
// for asymetric peaks, calculate the width as the square root of the
// product of the widths of the long and short axes
optional float a = 13; // shape of the peak: width of the long axis
// divided by width of the short axis
optional float theta = 14; // rotation of assymetric peak, only used
// when fitmode == TWOAXISANDTHETA
optional int32 flag = 6; // flag to categorize spots. Implementation specific
// Original xyz coordinates from fitting before drift or other correction correction
optional float x_original = 101;
optional float y_original = 102;
optional float z_original = 103;
// localization precision
optional float x_precision = 104;
optional float y_precision = 105;
optional float z_precision = 106;
// position in the original image (in pixels) used for fitting
optional int32 x_position = 107;
optional int32 y_position = 108;
// These ids can be used in your own .proto derived from this one
extensions 1500 to 2047;
}
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: TSFProto.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor(
name='TSFProto.proto',
package='TSF',
serialized_pb=_b('\n\x0eTSFProto.proto\x12\x03TSF\"\x92\x03\n\x08SpotList\x12\x19\n\x0e\x61pplication_id\x18\x01 \x02(\x05:\x01\x31\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x10\n\x08\x66ilepath\x18\x03 \x01(\t\x12\x0b\n\x03uid\x18\x04 \x01(\x03\x12\x13\n\x0bnr_pixels_x\x18\x05 \x01(\x05\x12\x13\n\x0bnr_pixels_y\x18\x06 \x01(\x05\x12\x12\n\npixel_size\x18\x07 \x01(\x02\x12\x10\n\x08nr_spots\x18\x08 \x01(\x03\x12\x10\n\x08\x62ox_size\x18\x11 \x01(\x05\x12\x13\n\x0bnr_channels\x18\x12 \x01(\x05\x12\x11\n\tnr_frames\x18\x13 \x01(\x05\x12\x11\n\tnr_slices\x18\x14 \x01(\x05\x12\x0e\n\x06nr_pos\x18\x15 \x01(\x05\x12*\n\x0elocation_units\x18\x16 \x01(\x0e\x32\x12.TSF.LocationUnits\x12,\n\x0fintensity_units\x18\x17 \x01(\x0e\x32\x13.TSF.IntensityUnits\x12\x1e\n\x08\x66it_mode\x18\x18 \x01(\x0e\x32\x0c.TSF.FitMode\x12\x17\n\x08is_track\x18\x19 \x01(\x08:\x05\x66\x61lse\"\xd8\x03\n\x04Spot\x12\x10\n\x08molecule\x18\x01 \x02(\x05\x12\x0f\n\x07\x63hannel\x18\x02 \x02(\x05\x12\r\n\x05\x66rame\x18\x03 \x02(\x05\x12\r\n\x05slice\x18\x04 \x01(\x05\x12\x0b\n\x03pos\x18\x05 \x01(\x05\x12*\n\x0elocation_units\x18\x11 \x01(\x0e\x32\x12.TSF.LocationUnits\x12\t\n\x01x\x18\x07 \x02(\x02\x12\t\n\x01y\x18\x08 \x02(\x02\x12\t\n\x01z\x18\t \x01(\x02\x12,\n\x0fintensity_units\x18\x12 \x01(\x0e\x32\x13.TSF.IntensityUnits\x12\x11\n\tintensity\x18\n \x02(\x02\x12\x12\n\nbackground\x18\x0b \x01(\x02\x12\r\n\x05width\x18\x0c \x01(\x02\x12\t\n\x01\x61\x18\r \x01(\x02\x12\r\n\x05theta\x18\x0e \x01(\x02\x12\x0c\n\x04\x66lag\x18\x06 \x01(\x05\x12\x12\n\nx_original\x18\x65 \x01(\x02\x12\x12\n\ny_original\x18\x66 \x01(\x02\x12\x12\n\nz_original\x18g \x01(\x02\x12\x13\n\x0bx_precision\x18h \x01(\x02\x12\x13\n\x0by_precision\x18i \x01(\x02\x12\x13\n\x0bz_precision\x18j \x01(\x02\x12\x12\n\nx_position\x18k \x01(\x05\x12\x12\n\ny_position\x18l \x01(\x05*\x06\x08\xdc\x0b\x10\x80\x10*8\n\x07\x46itMode\x12\x0b\n\x07ONEAXIS\x10\x00\x12\x0b\n\x07TWOAXIS\x10\x01\x12\x13\n\x0fTWOAXISANDTHETA\x10\x02*)\n\x0eIntensityUnits\x12\n\n\x06\x43OUNTS\x10\x00\x12\x0b\n\x07PHOTONS\x10\x01*+\n\rLocationUnits\x12\x06\n\x02NM\x10\x00\x12\x06\n\x02UM\x10\x01\x12\n\n\x06PIXELS\x10\x02\x42!\n\x0c\x65\x64u.ucsf.tsfB\x11TaggedSpotsProtos')
)
_sym_db.RegisterFileDescriptor(DESCRIPTOR)
_FITMODE = _descriptor.EnumDescriptor(
name='FitMode',
full_name='TSF.FitMode',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='ONEAXIS', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='TWOAXIS', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='TWOAXISANDTHETA', index=2, number=2,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=903,
serialized_end=959,
)
_sym_db.RegisterEnumDescriptor(_FITMODE)
FitMode = enum_type_wrapper.EnumTypeWrapper(_FITMODE)
_INTENSITYUNITS = _descriptor.EnumDescriptor(
name='IntensityUnits',
full_name='TSF.IntensityUnits',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='COUNTS', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PHOTONS', index=1, number=1,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=961,
serialized_end=1002,
)
_sym_db.RegisterEnumDescriptor(_INTENSITYUNITS)
IntensityUnits = enum_type_wrapper.EnumTypeWrapper(_INTENSITYUNITS)
_LOCATIONUNITS = _descriptor.EnumDescriptor(
name='LocationUnits',
full_name='TSF.LocationUnits',
filename=None,
file=DESCRIPTOR,
values=[
_descriptor.EnumValueDescriptor(
name='NM', index=0, number=0,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='UM', index=1, number=1,
options=None,
type=None),
_descriptor.EnumValueDescriptor(
name='PIXELS', index=2, number=2,
options=None,
type=None),
],
containing_type=None,
options=None,
serialized_start=1004,
serialized_end=1047,
)
_sym_db.RegisterEnumDescriptor(_LOCATIONUNITS)
LocationUnits = enum_type_wrapper.EnumTypeWrapper(_LOCATIONUNITS)
ONEAXIS = 0
TWOAXIS = 1
TWOAXISANDTHETA = 2
COUNTS = 0
PHOTONS = 1
NM = 0
UM = 1
PIXELS = 2
_SPOTLIST = _descriptor.Descriptor(
name='SpotList',
full_name='TSF.SpotList',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='application_id', full_name='TSF.SpotList.application_id', index=0,
number=1, type=5, cpp_type=1, label=2,
has_default_value=True, default_value=1,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='name', full_name='TSF.SpotList.name', index=1,
number=2, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='filepath', full_name='TSF.SpotList.filepath', index=2,
number=3, type=9, cpp_type=9, label=1,
has_default_value=False, default_value=_b("").decode('utf-8'),
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='uid', full_name='TSF.SpotList.uid', index=3,
number=4, type=3, cpp_type=2, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='nr_pixels_x', full_name='TSF.SpotList.nr_pixels_x', index=4,
number=5, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='nr_pixels_y', full_name='TSF.SpotList.nr_pixels_y', index=5,
number=6, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='pixel_size', full_name='TSF.SpotList.pixel_size', index=6,
number=7, type=2, cpp_type=6, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='nr_spots', full_name='TSF.SpotList.nr_spots', index=7,
number=8, type=3, cpp_type=2, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='box_size', full_name='TSF.SpotList.box_size', index=8,
number=17, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='nr_channels', full_name='TSF.SpotList.nr_channels', index=9,
number=18, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='nr_frames', full_name='TSF.SpotList.nr_frames', index=10,
number=19, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='nr_slices', full_name='TSF.SpotList.nr_slices', index=11,
number=20, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='nr_pos', full_name='TSF.SpotList.nr_pos', index=12,
number=21, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='location_units', full_name='TSF.SpotList.location_units', index=13,
number=22, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='intensity_units', full_name='TSF.SpotList.intensity_units', index=14,
number=23, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='fit_mode', full_name='TSF.SpotList.fit_mode', index=15,
number=24, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='is_track', full_name='TSF.SpotList.is_track', index=16,
number=25, type=8, cpp_type=7, label=1,
has_default_value=True, default_value=False,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=False,
extension_ranges=[],
oneofs=[
],
serialized_start=24,
serialized_end=426,
)
_SPOT = _descriptor.Descriptor(
name='Spot',
full_name='TSF.Spot',
filename=None,
file=DESCRIPTOR,
containing_type=None,
fields=[
_descriptor.FieldDescriptor(
name='molecule', full_name='TSF.Spot.molecule', index=0,
number=1, type=5, cpp_type=1, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='channel', full_name='TSF.Spot.channel', index=1,
number=2, type=5, cpp_type=1, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='frame', full_name='TSF.Spot.frame', index=2,
number=3, type=5, cpp_type=1, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='slice', full_name='TSF.Spot.slice', index=3,
number=4, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='pos', full_name='TSF.Spot.pos', index=4,
number=5, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='location_units', full_name='TSF.Spot.location_units', index=5,
number=17, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='x', full_name='TSF.Spot.x', index=6,
number=7, type=2, cpp_type=6, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='y', full_name='TSF.Spot.y', index=7,
number=8, type=2, cpp_type=6, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='z', full_name='TSF.Spot.z', index=8,
number=9, type=2, cpp_type=6, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='intensity_units', full_name='TSF.Spot.intensity_units', index=9,
number=18, type=14, cpp_type=8, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='intensity', full_name='TSF.Spot.intensity', index=10,
number=10, type=2, cpp_type=6, label=2,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='background', full_name='TSF.Spot.background', index=11,
number=11, type=2, cpp_type=6, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='width', full_name='TSF.Spot.width', index=12,
number=12, type=2, cpp_type=6, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='a', full_name='TSF.Spot.a', index=13,
number=13, type=2, cpp_type=6, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='theta', full_name='TSF.Spot.theta', index=14,
number=14, type=2, cpp_type=6, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='flag', full_name='TSF.Spot.flag', index=15,
number=6, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='x_original', full_name='TSF.Spot.x_original', index=16,
number=101, type=2, cpp_type=6, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='y_original', full_name='TSF.Spot.y_original', index=17,
number=102, type=2, cpp_type=6, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='z_original', full_name='TSF.Spot.z_original', index=18,
number=103, type=2, cpp_type=6, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='x_precision', full_name='TSF.Spot.x_precision', index=19,
number=104, type=2, cpp_type=6, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='y_precision', full_name='TSF.Spot.y_precision', index=20,
number=105, type=2, cpp_type=6, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='z_precision', full_name='TSF.Spot.z_precision', index=21,
number=106, type=2, cpp_type=6, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='x_position', full_name='TSF.Spot.x_position', index=22,
number=107, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
_descriptor.FieldDescriptor(
name='y_position', full_name='TSF.Spot.y_position', index=23,
number=108, type=5, cpp_type=1, label=1,
has_default_value=False, default_value=0,
message_type=None, enum_type=None, containing_type=None,
is_extension=False, extension_scope=None,
options=None),
],
extensions=[
],
nested_types=[],
enum_types=[
],
options=None,
is_extendable=True,
extension_ranges=[(1500, 2048), ],
oneofs=[
],
serialized_start=429,
serialized_end=901,
)
_SPOTLIST.fields_by_name['location_units'].enum_type = _LOCATIONUNITS
_SPOTLIST.fields_by_name['intensity_units'].enum_type = _INTENSITYUNITS
_SPOTLIST.fields_by_name['fit_mode'].enum_type = _FITMODE
_SPOT.fields_by_name['location_units'].enum_type = _LOCATIONUNITS
_SPOT.fields_by_name['intensity_units'].enum_type = _INTENSITYUNITS
DESCRIPTOR.message_types_by_name['SpotList'] = _SPOTLIST
DESCRIPTOR.message_types_by_name['Spot'] = _SPOT
DESCRIPTOR.enum_types_by_name['FitMode'] = _FITMODE
DESCRIPTOR.enum_types_by_name['IntensityUnits'] = _INTENSITYUNITS
DESCRIPTOR.enum_types_by_name['LocationUnits'] = _LOCATIONUNITS
SpotList = _reflection.GeneratedProtocolMessageType('SpotList', (_message.Message,), dict(
DESCRIPTOR = _SPOTLIST,
__module__ = 'TSFProto_pb2'
# @@protoc_insertion_point(class_scope:TSF.SpotList)
))
_sym_db.RegisterMessage(SpotList)
Spot = _reflection.GeneratedProtocolMessageType('Spot', (_message.Message,), dict(
DESCRIPTOR = _SPOT,
__module__ = 'TSFProto_pb2'
# @@protoc_insertion_point(class_scope:TSF.Spot)
))
_sym_db.RegisterMessage(Spot)
DESCRIPTOR.has_options = True
DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n\014edu.ucsf.tsfB\021TaggedSpotsProtos'))
# @@protoc_insertion_point(module_scope)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment