Trackmate discrepant results between GUI and script

imagej
trackmate

#1

I’m obtaining different results from trackmate when using the GUI and a custom script. I believe the same parameters were applied but the number of detected spots is very different! (647 GUI vs 259 script)

Here is the script:

	model = Model()
	model.setLogger(Logger.IJ_LOGGER)

	settings = Settings()
	settings.setFrom(imp)

	# Configure detector
	settings.detectorFactory = LogDetectorFactory()
	settings.detectorSettings = {
		DetectorKeys.KEY_DO_SUBPIXEL_LOCALIZATION : True,
		DetectorKeys.KEY_RADIUS : 2.5,
		DetectorKeys.KEY_TARGET_CHANNEL : 1,
		DetectorKeys.KEY_THRESHOLD : 50.,
		DetectorKeys.KEY_DO_MEDIAN_FILTERING : False,
	}

	# Configure tracker
	settings.trackerFactory = SparseLAPTrackerFactory()
	settings.trackerSettings = LAPUtils.getDefaultLAPSettingsMap()
	
	settings.addSpotAnalyzerFactory(SpotIntensityAnalyzerFactory())
	settings.addSpotAnalyzerFactory(SpotContrastAndSNRAnalyzerFactory())
	settings.addSpotAnalyzerFactory(SpotRadiusEstimatorFactory())


	#----------------------
	# Instantiate trackmate
	#----------------------

	trackmate = TrackMate(model, settings)
	settings.trackerFactory = SparseLAPTrackerFactory()
	settings.trackerSettings = LAPUtils.getDefaultLAPSettingsMap()		
	
	settings.trackerSettings['LINKING_MAX_DISTANCE'] = LINKING_MAX_DISTANCE
	settings.trackerSettings['GAP_CLOSING_MAX_DISTANCE']=GAP_CLOSING_MAX_DISTANCE
	settings.trackerSettings['MAX_FRAME_GAP']= MAX_FRAME_GAP
	
	
	settings.addSpotAnalyzerFactory(SpotIntensityAnalyzerFactory())
	settings.addSpotAnalyzerFactory(SpotContrastAndSNRAnalyzerFactory())
	   
	# Add an analyzer for some track features, such as the track mean speed.
	settings.addTrackAnalyzer(TrackSpeedStatisticsAnalyzer())
	settings.addTrackAnalyzer(TrackDurationAnalyzer())
	   		   
	trackmate = TrackMate(model, settings)

script

What is different here?


#2

Found the problem, I imported the DoG detector instead of the LoG!