public void enableHeadlessAnalysis(boolean b) throws ImproperUseException {
		checkHeadlessStatus();

		headless.getOptions().enableAnalysis(b);
	}
Enables or disables analysis according to the passed-in boolean value.
<p>
A script that calls this method should run as a 'preScript', since preScripts
execute before analysis would typically run. Running the script as a 'postScript'
is ineffective, since the stage at which analysis would have happened has already 
passed.
<p>
This change will persist throughout the current HeadlessAnalyzer session, unless
changed again (in other words, once analysis is enabled via script for one program,
it will also be enabled for future programs in the current session, unless changed). 

@param b  true to enable analysis, false to disable analysis
@throws ImproperUseException if not in headless mode or headless instance not set 
@see #isHeadlessAnalysisEnabled()
Ghidra/Features/Base/src/main/java/ghidra/app/util/headless/HeadlessScript.java