diff --git a/+CFSVM/+Element/+Screen/CustomScreen.m b/+CFSVM/+Element/+Screen/CustomScreen.m index 04991d6..7a7768e 100644 --- a/+CFSVM/+Element/+Screen/CustomScreen.m +++ b/+CFSVM/+Element/+Screen/CustomScreen.m @@ -44,13 +44,13 @@ obj.background_color = kwargs.background_color; obj.fields{1} = CFSVM.Element.Screen.ScreenField(kwargs.initial_rect); if kwargs.is_stereo - set(0, 'units', 'pixels'); - screen_size = get(0, 'ScreenSize'); + [screen_width, ~] = Screen('WindowSize', max(Screen('Screens'))); second_rect = [ ... - screen_size(3) - kwargs.initial_rect(3), ... + screen_width - kwargs.initial_rect(3), ... kwargs.initial_rect(2), ... - screen_size(3) - kwargs.initial_rect(1), ... + screen_width - kwargs.initial_rect(1), ... kwargs.initial_rect(4)]; + obj.fields{2} = CFSVM.Element.Screen.ScreenField(second_rect); end obj.shift = kwargs.shift; diff --git a/docs/fixation_generator.md b/docs/fixation_generator.md index 14a25fd..3e22204 100644 --- a/docs/fixation_generator.md +++ b/docs/fixation_generator.md @@ -13,7 +13,7 @@ import CFSVM.Generators.FixationGenerator ``` ### Initialize the generator object -The arguments of the object constructor are as follows: first, the path to the parent directory in which the `Fixation/` folder will be created. The generated fixation target will be saved inside this folder. Next, the **radius** argument describes the radius in pixels of the largest shape in the fixation, e.g., radius of the big circle in the "AB" shape or half-width of the cross in "AC" shape, the final image resolution will be (radius\*2+1, radius\*2+1).We suggest using a minimum of 128 pixels and resizing it later in the experiment code, instead of generating an image with low resolution. +The arguments of the object constructor are as follows: first, the path to the parent directory in which the `Fixation/` folder will be created. The generated fixation target will be saved inside this folder. Next, the **radius** argument describes the radius in pixels of the largest shape in the fixation, e.g., radius of the big circle in the "AB" shape or half-width of the cross in "AC" shape, the final image resolution will be (radius\*2+1, radius\*2+1). We suggest using a minimum of 128 pixels and resizing it later in the experiment code, instead of generating an image with low resolution. After that, the **hex_color** sets the color of the fixation target. If you'd like to smooth the edges of the image, set **is_smooth_edges** to `true` and **smoothing_cycles** to some positive integer (the greater the number, the smoother edges will be). You can also set **is_outline** to `true` to leave only outlines of the fixation (you will need an [installed](https://uk.mathworks.com/matlabcentral/answers/101885-how-do-i-install-additional-toolboxes-into-an-existing-installation-of-matlab#answer_111232) Image Processing Toolbox for outlining).