//Pattern_Stimulation.mac is a macro designed for NIS Elements (Nikon Instruments) and validated with the version 5.21.30 (Build 1489) of the software. //This macro contains a protocol of micropattern photoablation on a multi-photon microscope powered by NIS Elements. //Ablate a small fiduciary marker in the center of the field of view SelectOptConf("Print_Fiduciary_Marker"); //burn a small square through many Z-planes ND_RunZSeriesExp(); //Focus the microscope on the PVA coated surface of the coverslip SelectOptConf("Autofocus"); //Use autofocus to find the best focal plane StgFocus(); //Pattern the desired micropattern. File path for binary map of the pattern is stored in PatternMapPath variable. SelectOptConf("Load_ROI"); //capture a 2048 image to load the ROI which is also 2048 CloseAllDocuments(2); Capture(); ClearMeasROI(); LoadROI(PatternMapPath,1); ChangeROIType(1,3); //set the desired ROIs as stimulation ROI ChangeROIType(2,3); ChangeROIType(3,3); ChangeROIType(8,3); ChangeROIType(9,3); ChangeROIType(12,3); ChangeROIType(13,3); ChangeROIType(14,3); A1ApplyStimulationSettings(); //Apply Stimulation settings in ND stimulation SelectOptConf("Micropattern"); //Pattern in the number of Z planes defined in the ND stimulation settings ND_RunSequentialStimulationExp();